lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Ye <yuanzhou...@gmail.com>
Subject Re: Updating the DocValues field doesn't seem to update its associated StoredField value
Date Mon, 19 Jun 2017 15:50:49 GMT
Thanks Mike! My colleague only forwarded Erick's Solr reply today as it
seems I didn't get any emails and may have been taken off the mailing list
for some reason?

We're using Lucene core only (version 6.2.1 at the moment). So there's no
link between the docValue and its associated stored field? Is there
anything similar/equivalent to useDocValuesAsStored in Lucene core? We're
trying to use docValues to avoid a full update (delete + create new)...
Yet, we still need to retrieve the updated values.

Regards,
Joe

On Mon, Jun 19, 2017 at 4:16 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> Updating the doc value will not update the stored field (what document.get
> returns).  If you need to change stored fields you have to use the
> IW.updateDocuments API, where the old document is deleted and a new
> document is indexed, atomically (to refresh).
>
> But also see Erick's solr-specific response (to the list) a week ago.
>
> Mike McCandless
>
> http://blog.mikemccandless.com
>
> On Mon, Jun 19, 2017 at 5:41 AM, Joe Ye <yuanzhou.ye@gmail.com> wrote:
>
>> Hi,
>>
>> Could anyone help with my issue described below? If I'm not posting on the
>> right mailing list please direct me to the correct one.
>>
>> Many thanks,
>> Joe
>>
>>
>> On Mon, Jun 12, 2017 at 3:05 PM, Joe Ye <yuanzhou.ye@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > I have a few NumericDocValuesField fields and also added separate
>> > StoredField fields to store the values so that I can access them in
>> query
>> > results. I used IndexWriter.updateNumericDocValue to update the value
>> of
>> > a DocValues field. Then I firstly called SearcherManager.maybeRefresh to
>> > ensure SearcherManager.acquire will return refreshed instances and used
>> DocValuesNumbersQuery
>> > with the updated value. I did get the matching document in the query
>> > result but when I tried to access its value using  Document.get, it's
>> still
>> > the old value. It appears that updating the DocValues field doesn't
>> update
>> > its associated StoredField value. What do I miss here?
>> >
>> >
>> > I would highly appreciate your help!
>> >
>> >
>> > Regards,
>> >
>> > Joe
>> >
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message