Open mikemccand opened 5 years ago
I am looking at this
[Legacy Jira: Rahul Yadav on Nov 23 2019]
I was able to reproduce the issue.Getting the exception as described.
Analysis on-going
[Legacy Jira: Rahul Yadav on Dec 01 2019]
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!
[Legacy Jira: Michele Palmia (@micpalmia) on Mar 02 2020]
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.
[Legacy Jira: David Smiley (@dsmiley) on Mar 09 2020]
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).
[Legacy Jira: Michele Palmia (@micpalmia) on Mar 10 2020]
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.
Legacy Jira details
LUCENE-8674 by Johannes Kloos on Jan 31 2019, updated Mar 10 2020 Environment: