Hi,
Apologies for the cross post. We have a class overridding
SpanPositionRangeQuery. It is similar to a SpanFirst query but it is capable of
adjusting the boost value with regard to distance. With the 5.4 upgrade the
unit tests suddenly threw the following exception:
Query class org.GrSpanFirstQuery does not propagate Query.rewrite call to
super.rewrite
at
__randomizedtesting.SeedInfo.seed([CA3D7CF96D5E8E7:88BE883E6CA09E3F]:0)
at junit.framework.Assert.fail(Assert.java:57)
at junit.framework.Assert.assertTrue(Assert.java:22)
at org.apache.lucene.search.QueryUtils.check(QueryUtils.java:73)
at
org.apache.lucene.search.AssertingIndexSearcher.rewrite(AssertingIndexSearcher.java:83)
at
org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:886)
at
org.apache.lucene.search.AssertingIndexSearcher.createNormalizedWeight(AssertingIndexSearcher.java:58)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:535)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:744)
at
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:460)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:489)
I tracked it down to LUCENE-6590 - Explore different ways to apply boosts, but
the solution did not really pop in my head right away. Implementing rewrite
does not seem to change anything. Everything fails in the unit test at the
point i want to retrieve docs and assert their positions in the result set:
ScoreDoc[] docs = searcher.search(spanfirstquery, 10).scoreDocs;
I am probably missing something but any ideas to share?
Many thanks!
Markus
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]