[
https://issues.apache.org/jira/browse/LUCENE-4992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13654749#comment-13654749
]
Robert Muir commented on LUCENE-4992:
-------------------------------------
John I see: so I think the whole design of this thing doesnt work today for
your use case (where valSrcScorer is BooleanScorer2).
It seems implicit in this CustomScoreQuery's implementation that the value
source scorers will match all documents, yet nothing about the API enforces
this, instead it takes arbitrary Query (but won't actually work correctly today
with arbitrary queries!):
{code}
public CustomScoreQuery(Query subQuery, Query... scoringQueries) {
{code}
I feel like one of three things should happen:
1. Change behavior of CustomScoreQuery to act more conjunction-like as you
suggest. Though this means this query would be doing a significantly different
thing than its current javadocs describe.
2. Keep the behavior of today, except add NO_MORE_DOCS checks. But this can be
confusing too, e.g. what would vScores[i] contain for an exhausted
valSrcScorer?
2. Current behavior, but scoringQueries changed to *FunctionQuery* to be
type-safe.
Any ideas?
> ArrayOutOfBoundsException in BooleanScorer2
> -------------------------------------------
>
> Key: LUCENE-4992
> URL: https://issues.apache.org/jira/browse/LUCENE-4992
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/search
> Affects Versions: 4.1
> Reporter: John Wang
> Attachments: patch.diff
>
>
> Seeing following exception in BooleanScorer2 in our production system:
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
> 2147483647
> at
> org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:312)
> at
> org.apache.lucene.queries.CustomScoreQuery$CustomScorer.score(CustomScoreQuery.java:324)
> at
> org.apache.lucene.search.DisjunctionMaxScorer.score(DisjunctionMaxScorer.java:84)
> at
> org.apache.lucene.search.TopScoreDocCollector$InOrderTopScoreDocCollector.collect(TopScoreDocCollector.java:47)
> at org.apache.lucene.search.Scorer.score(Scorer.java:64)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:605)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:482)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:438)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:281)
> at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:269)
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]