Message from discussion
Updating a document (with a new facet value)
Received: by 10.52.88.130 with SMTP id bg2mr22933014vdb.6.1323126905981;
Mon, 05 Dec 2011 15:15:05 -0800 (PST)
X-BeenThere: zoie@googlegroups.com
Received: by 10.220.149.17 with SMTP id r17ls3770869vcv.0.gmail; Mon, 05 Dec
2011 15:15:05 -0800 (PST)
Received: by 10.52.187.131 with SMTP id fs3mr22860473vdc.4.1323126905088;
Mon, 05 Dec 2011 15:15:05 -0800 (PST)
Received: by 10.52.187.131 with SMTP id fs3mr22860470vdc.4.1323126905071;
Mon, 05 Dec 2011 15:15:05 -0800 (PST)
Return-Path: <tco...@colar.net>
Received: from mail-vw0-f58.google.com (mail-vw0-f58.google.com [209.85.212.58])
by gmr-mx.google.com with ESMTPS id bu17si7127129vdc.0.2011.12.05.15.15.04
(version=TLSv1/SSLv3 cipher=OTHER);
Mon, 05 Dec 2011 15:15:04 -0800 (PST)
Received-SPF: neutral (google.com: 209.85.212.58 is neither permitted nor denied by best guess record for domain of tco...@colar.net) client-ip=209.85.212.58;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.212.58 is neither permitted nor denied by best guess record for domain of tco...@colar.net) smtp.mail=tco...@colar.net
Received: by vbbfc26 with SMTP id fc26so5125925vbb.23
for <zoie@googlegroups.com>; Mon, 05 Dec 2011 15:15:04 -0800 (PST)
MIME-Version: 1.0
Received: by 10.52.181.137 with SMTP id dw9mr913046vdc.10.1323126904677; Mon,
05 Dec 2011 15:15:04 -0800 (PST)
Received: by h5g2000yqk.googlegroups.com with HTTP; Mon, 5 Dec 2011 15:15:04
-0800 (PST)
Date: Mon, 5 Dec 2011 15:15:04 -0800 (PST)
In-Reply-To: <CABkrfq9Nv622quWaLRujKHKw=eWVmSWQ9NTfwEbJLrnJiumRRQ@mail.gmail.com>
References: <1b5d91d1-75a2-49d2-a649-1e46428636df@s17g2000pra.googlegroups.com>
<CABkrfq-BFDp3vr5x+xCz3kh+XNveJK-w6L-Z270L8_NDjnsYrw@mail.gmail.com>
<4ED552A7.5060206@colar.net> <CABkrfq9Nv622quWaLRujKHKw=eWVmSWQ9NTfwEbJLrnJiumRRQ@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2)
AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2,gzip(gfe)
Message-ID: <f6a25334-2a15-4b00-a666-4dce67886...@h5g2000yqk.googlegroups.com>
Subject: Re: Updating a document (with a new facet value)
From: Thibaut <tco...@colar.net>
To: zoie <zoie@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Sorry if that's a silly question, but I'd like to make sure of what is
the proper way to use "version" in particular in relation to
syncWithVersion() and indexing documents.
- Is version meant to be updated(+1) at each document modification ?
- Is version meant to be updated only when the document "model" has
changed (ie: new fields) ?
- Does ZoieSystem.getCurrentVersion() has to do with this or not ?
In general what does version refer to, and what is the suggested way
to maintain/use it.
If sone doc explains this let me know.
Thanks.
On Nov 29, 2:04=A0pm, Lei Wang <won...@gmail.com> wrote:
> BrowseResult is only for searching, you have to create ZoieIndexable
> objects for indexing.
>
> and the indexing is asynchronous, take awhile for it showing up in your
> search results. if you want synchronous indexing, call syncWithVersion
> after consuming your data.
>
> - Lei
>
>
>
>
>
>
>
> On Tue, Nov 29, 2011 at 1:46 PM, Thibaut Colar <tco...@colar.net> wrote:
> > =A0Ok, that's what I'm doing but here are to more questions in regards =
to
> > that:
>
> > - When i read the document via a BrowseResult and add some fields, can =
I
> > save that updated document directly,or do I have to copy all the fields
> > again into a ZoieIndexable object to be able to save it (and make a
> > consumable event to be consumed from that)?
>
> > - It seem if the doc was just created before I try to update it, the
> > search might fail to fond it, unless i do
> > indexingSystem.refreshDiskReader() and
> > indexingSystem.flushEventsToMemoryIndex() ... now of course doing it th=
at
> > way makes it much much slower, am I missing something ?
>
> > Thanks
>
> > On 11/29/11 11:23 AM, Lei Wang wrote:
>
> > for now, you have to find the doc first update with new values and save
> > back to zoie.
>
> > =A0Partial update has not been supported yet.
>
> > =A0- Lei
> > On Tue, Nov 29, 2011 at 11:15 AM, Thibaut <tco...@colar.net> wrote:
>
> >> An example will probably be easier:
>
> >> Say for example I have a user and I want to store what schools he went
> >> to (for facetted search)
>
> >> I would use a multivalue facet field in my user document, for example
> >> it would be called user_schools - It will store the school names.
>
> >> Now i can create that document fine, but I'm not sure on what is the
> >> proper approach on updating the facet values, say at some point I want
> >> to add(or remove) a new school for that existing user.
>
> >> Do i have to:
> >> - find the existing doc, update the user_schools values, save the
> >> document.
> >> - can i just do a save request with the doc unique id and just the new
> >> value for that facet field (since in theory if the id alreday exists
> >> it should just update it) .... but how would that work as far as
> >> removing a facet value ?
>
> >> Any examples on updating a zoie document, in particular facet values ?
>
> >> Thanks.
>
> >> --
> >> You received this message because you are subscribed to the Google Gro=
ups
> >> "zoie" group.
> >> To post to this group, send email to zoie@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> zoie+unsubscribe@googlegroups.com.
> >> For more options, visit this group at
> >>http://groups.google.com/group/zoie?hl=3Den.
>
> > =A0--
> > You received this message because you are subscribed to the Google Grou=
ps
> > "zoie" group.
> > To post to this group, send email to zoie@googlegroups.com.
> > To unsubscribe from this group, send email to
> > zoie+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/zoie?hl=3Den.
>
> > =A0--
> > You received this message because you are subscribed to the Google Grou=
ps
> > "zoie" group.
> > To post to this group, send email to zoie@googlegroups.com.
> > To unsubscribe from this group, send email to
> > zoie+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/zoie?hl=3Den.