You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Guillaume Smet (JIRA)" <ji...@apache.org> on 2016/02/23 18:03:18 UTC
[jira] [Updated] (LUCENE-7044) Range faceting fails on
SortedNumericDocValuesField
[ https://issues.apache.org/jira/browse/LUCENE-7044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Smet updated LUCENE-7044:
-----------------------------------
Description:
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:
{code}
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)
{code}
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
was:
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
> 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:
> {code}
> 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)
> {code}
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org