Skip to content

Apache Lucene open-source search software

LUCENE-2473: Clicking on the more results link in luceneweb.war demo results in AIOOBE

Robert Muir56e4df5f3d8c
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 2fe4021d30d..181fb3681eb 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -398,6 +398,10 @@ Bug fixes
* LUCENE-2467: Fixed memory leaks in IndexWriter when large documents
are indexed. (Mike McCandless)
+* LUCENE-2473: Clicking on the "More Results" link in the luceneweb.war
+ demo resulted in ArrayIndexOutOfBoundsException.
+ (Sami Siren via Robert Muir)
+
New features
* LUCENE-2128: Parallelized fetching document frequencies during weight
diff --git a/lucene/src/jsp/results.jsp b/lucene/src/jsp/results.jsp
index 16931df1b30..90cc0201dc2 100755
--- a/lucene/src/jsp/results.jsp
+++ b/lucene/src/jsp/results.jsp
@@ -114,7 +114,7 @@ public String escapeHTML(String s) {
// searcher != null was to handle
// a weird compilation bug
thispage = maxpage; // default last element to maxpage
- hits = searcher.search(query, maxpage); // run the query
+ hits = searcher.search(query, maxpage + startindex); // run the query
if (hits.totalHits == 0) { // if we got no results tell the user
%>
<p> I'm sorry I couldn't find what you were looking for. </p>