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 Hardy Ferentschik <ha...@hibernate.org> on 2015/07/14 18:19:30 UTC
Dynamic faceting with multi value numeric fields
Hi,
I am implementing dynamic faceting as described here - http://www.norconex.com/facets-with-lucene/
and running into trouble for multi value facets. For strings this is not a problem. One can use
SortedSetDocValuesFacetField when indexing the values for faceting and SortedSetDocValuesFacetCounts
for the actual facet query. This way I can add multiple values for the same field.
When it comes to numbers I use NumericDocValuesField for indexing and LongRangeFacetCounts for faceting
This works for single valued fields, but I cannot add multiple numeric values as with
SortedSetDocValuesFacetField. If I try to add multiple NumericDocValuesField I get an excption
during indexing. Changing to a SortedNumericDocValuesField, I can add mutliple numeric values during
index time, but then I get an exception when using LongRangeFacetCounts.
Is there a reason why dynamic faceting does not work for multi value numeric fields? Is this a
limitation of the Lucene engine or would it be possible in general? Is there a potential workaround?
Any help appreciated,
Hardy
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org