Guillaume Smet created LUCENE-7044:
--------------------------------------
Summary: Range faceting fails on SortedNumericDocValuesField
Key: LUCENE-7044
URL: https://issues.apache.org/jira/browse/LUCENE-7044
Project: Lucene - Core
Issue Type: Bug
Reporter: Guillaume Smet
Hi,
Context: https://hibernate.atlassian.net/browse/HSEARCH-1927
By using SortedNumericDocValuesField, we can index several numeric values for
the same field.
But we can't execute a range query on it using LongRangeFacetCounts.
Lucene fails with the following stacktrace:
{{
java.lang.IllegalStateException: unexpected docvalues type SORTED_NUMERIC for
field 'ingredients.price' (expected=NUMERIC). Use UninvertingReader or index
with docvalues.
at org.apache.lucene.index.DocValues.checkField(DocValues.java:208)
at org.apache.lucene.index.DocValues.getNumeric(DocValues.java:227)
at
org.apache.lucene.queries.function.valuesource.LongFieldSource.getValues(LongFieldSource.java:67)
at
org.apache.lucene.facet.range.LongRangeFacetCounts.count(LongRangeFacetCounts.java:80)
at
org.apache.lucene.facet.range.LongRangeFacetCounts.<init>(LongRangeFacetCounts.java:69)
}}
Either LongRangeFacetCounts needs some tweaking to accept SORTED_NUMERIC or we
need another implementation to deal with SortedNumericDocValuesField (and
probably an implementation of both for Doubles).
--
Guillaume
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]