apache / apache/lucene

java.lang.ArrayIndexOutOfBoundsException in BooleanScorer2.score [LUCENE-4341]

Open
#5,408 2 comments 0 reactions 0 assignees View on GitHub
affects-version:3.6 legacy-jira-priority:Major module:core/queryparser module:core/search type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

I've only recently noticed this exception. For some reason, it doesn't always produce a stacktrace. I'll try to investigate some more and will try again with Lucene 3.6.1

java.lang.ArrayIndexOutOfBoundsException: 32
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:310)
at org.apache.lucene.search.BooleanScorer2$SingleMatchScorer.score(BooleanScorer2.java:122)
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:309)
at org.apache.lucene.util.ScorerDocQueue.topScore(ScorerDocQueue.java:116)
at org.apache.lucene.search.DisjunctionSumScorer.advanceAfterCurrent(DisjunctionSumScorer.java:168)
at org.apache.lucene.search.DisjunctionSumScorer.nextDoc(DisjunctionSumScorer.java:141)
at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:280)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:383)

---
Migrated from [LUCENE-4341](https://issues.apache.org/jira/browse/LUCENE-4341) by Raimund Merkert
Environment:
```
Windows 2008 R2, JDK 1.7
```

Contributor guide

Open the contributing guide

Research direction

Start at org.apache.lucene.search.BooleanScorer2.score, especially lines 309-310, and trace the reported call path through ScorerDocQueue and DisjunctionSumScorer. Reproduce the ArrayIndexOutOfBoundsException in the reported Windows 2008 R2 and JDK 1.7 environment; the issue is complete when the cause is identified and the exception no longer occurs for the triggering search.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.