You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Rose, Stuart J" <St...@pnnl.gov> on 2014/01/22 00:15:44 UTC

updating docs when using SortedSetDocValuesFacetFields

I'm using Lucene 4.4 with SortedSetDocValuesFacetFields and would like to add and/or remove CategoryPaths for certain documents in the index.

Basically, as additional sets of docs are added, the CategoryPaths for some of the previously indexed documents need to changed.

My current testing with using writer.updateDocument(docIdTerm, docFields) seems to be generating some duplicates as there are more documents in the index than expected.

Is this a known issue with SortedSetDocValuesFacetFields and discouraged?

Thanks!
Stuart


Re: updating docs when using SortedSetDocValuesFacetFields

Posted by Shai Erera <se...@gmail.com>.
Note that Lucene doesn't support general in-place document updates, and
updating a document means first deleting it and adding it back.

Therefore if you only intend to add/change few categories of an existing
document, you have to fully re-index the document. This is not specific to
categories but applies for any field that you add, except NumericDocValues
fields which support in-place document updates since Lucene 4.6.

Shai


On Wed, Jan 22, 2014 at 1:15 AM, Rose, Stuart J <St...@pnnl.gov>wrote:

> I'm using Lucene 4.4 with SortedSetDocValuesFacetFields and would like to
> add and/or remove CategoryPaths for certain documents in the index.
>
> Basically, as additional sets of docs are added, the CategoryPaths for
> some of the previously indexed documents need to changed.
>
> My current testing with using writer.updateDocument(docIdTerm, docFields)
> seems to be generating some duplicates as there are more documents in the
> index than expected.
>
> Is this a known issue with SortedSetDocValuesFacetFields and discouraged?
>
> Thanks!
> Stuart
>
>