lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vjeran Marcinko <vmarci...@gmail.com>
Subject Document updating and SortedSetDocValuesFacetField
Date Wed, 30 Aug 2017 18:37:29 GMT
?Hi everyone,

Short question is: How do one update document that already has some
SortedSetDocValuesFacetFields?

Longer story is here...

I'm using SortedSetDocValuesFacetField and faceting feature to
implement "count by group" and everything works fine when I store the
document for first time, such as:
indexWriter.addDocument(facetConfig.build(document));
 and later query these "group counts" using FacetCollector and
SortedSetDocValuesFacetCounts.

BUT, later when I read those stored documents, and update these
documents in index (because I added some additional fields to them):

indexWriter.updateDocument(term, document);
or even using facetConfig again...
indexWriter.updateDocument(term, facetConfig.build(document));

Then it seems that these faceting/docValued field information is no
longer there or whatever, because my querying for "group counts"
doesn't take these documents into account. And if I update all
documents in index in described way, then it seems this whole faceted
field is no longer there because I get following when trying to
collect these "group counts":

Exception in thread "main" java.lang.IllegalArgumentException: field
"facet_category" was not indexed with SortedSetDocValues
at org.apache.lucene.facet.sortedset.DefaultSortedSetDocValuesReaderState.<init>(DefaultSortedSetDocValuesReaderState.java:72)
...
...

Regards,
Vjeran

---------------------------------------------------------------------
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