Open asfimport opened 5 years ago
Rahul Yadav (migrated from JIRA)
I am looking at this
Rahul Yadav (migrated from JIRA)
I was able to reproduce the issue.Getting the exception as described.
Analysis on-going
Michele Palmia (@micpalmia) (migrated from JIRA)
This is due to a VectorValueSource being fed to a FunctionRangeQuery, that is therefore trying to use its floatVal. By default, requesting the floatVal(int doc) of a VectorValueSource throws an UnsupportedOperationException, since no algorithm for merging the (possibly multiple) values is implemented.
For reference, the query Solr tries to do is the following,
new ConstantScoreQuery(
new FunctionRangeQuery(
new VectorValueSource(
new BytesRefFieldSource("any_field"),
new SortedSetFieldSource("another_field")
), 0, 100, true, true));
that always throws an exception if there are documents in the index.
From the way it's implemented (with the UnsupportedOperationException) it doesn't look like this kind of inconsistencies are meant to be fixed in Lucene. But not sure about that.
Any suggestions are appreciated!
David Smiley (@dsmiley) (migrated from JIRA)
I don't think VectorValueSource is involved here since it's only used by some spatial stuff in Solr. The Environment/description info doesn't suggest spatial is used at all.
Michele Palmia (@micpalmia) (migrated from JIRA)
The problematic query ( ?fq=\{!frange l=10 u=100}or_version_s,directed_by
) specifies two value sources separated by a comma (or_version_s,directed_by
). These are parsed as a VectorValueSource
embedding the two individual ValueSources corresponding to the two fields (see FunctionQParser.java:115).
Requesting the following URL causes Solr to return an HTTP 500 error response:
The error response seems to be caused by the following uncaught exception:
Sadly, I can't understand the logic of this code well enough to give any insights.
To set up an environment to reproduce this bug, follow the description in the ‘Environment’ field.
We found this issue and \~70 more like this using Diffblue Microservices Testing. Find more information on this fuzz testing campaign.
Migrated from LUCENE-8674 by Johannes Kloos, updated Mar 10 2020 Environment: