Description
Upgrading to Apache Solr/Lucene 8.0, this popped up in our unit tests:
Caused by: java.lang.ClassCastException: org.apache.lucene.queries.function.ValueSource$ScoreAndDoc cannot be cast to org.apache.lucene.search.Scorer
at org.apache.lucene.queries.function.ValueSource$FromDoubleValuesSource.getValues(ValueSource.java:288)
at org.apache.lucene.queries.function.valuesource.MultiFloatFunction.getValues(MultiFloatFunction.java:76)
at org.apache.lucene.queries.function.valuesource.ReciprocalFloatFunction.getValues(ReciprocalFloatFunction.java:64)
at org.apache.lucene.queries.function.valuesource.MultiFloatFunction.getValues(MultiFloatFunction.java:76)
at org.apache.lucene.queries.function.ValueSource$WrappedDoubleValuesSource.getValues(ValueSource.java:203)
at org.apache.lucene.queries.function.FunctionScoreQuery$MultiplicativeBoostValuesSource.getValues(FunctionScoreQuery.java:248)
at org.apache.lucene.queries.function.FunctionScoreQuery$FunctionScoreWeight.scorer(FunctionScoreQuery.java:211)
at org.apache.lucene.search.Weight.scorerSupplier(Weight.java:143)
at org.apache.lucene.search.BooleanWeight.scorerSupplier(BooleanWeight.java:374)
at org.apache.lucene.search.BooleanWeight.scorer(BooleanWeight.java:340)
at org.apache.lucene.search.Weight.bulkScorer(Weight.java:177)
at org.apache.lucene.search.BooleanWeight.bulkScorer(BooleanWeight.java:334)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:649)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:443)
at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:200)
at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1604)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1420)
at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:567)
at org.apache.solr.handler.component.QueryComponent.doProcessUngroupedSearch(QueryComponent.java:1434)
at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:373)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:306)
It only happens when, edismax, we boost by geodist:
recip(max(100,geodist()),1,10,1)
http://mail-archives.apache.org/mod_mbox/lucene-java-user/201903.mbox/browser