lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Updating the DocValues field doesn't seem to update its associated StoredField value
Date Mon, 12 Jun 2017 15:20:33 GMT
bq:  ...added separate StoredField fields to store the values ....

You're exactly right, those are two separate fields, how would Solr
(or Lucene) know they were related? There's no reason to have the
second stored field, you can return the value of a docValues field
even if stored="false", see the discussion about useDocValuesAsStored
in the reference guide. There's a discussion in the reference guide
for Solr 6.5, not sure what version you're using though.

Best,
Erick

On Mon, Jun 12, 2017 at 7:05 AM, 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

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message