Author: hdu
Date: Thu Dec  5 16:21:20 2013
New Revision: 1548193

URL: http://svn.apache.org/r1548193
Log:
#i122871# fix Help search finding more than 100 items

fixing the allocation size for the search result prevents
an ArrayIndexOutOfBoundException so that the search can
finish successfully

Patch by: [email protected]
Review by: [email protected]

Modified:
    openoffice/trunk/main/xmlhelp/source/com/sun/star/help/HelpSearch.java

Modified: openoffice/trunk/main/xmlhelp/source/com/sun/star/help/HelpSearch.java
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/xmlhelp/source/com/sun/star/help/HelpSearch.java?rev=1548193&r1=1548192&r2=1548193&view=diff
==============================================================================
--- openoffice/trunk/main/xmlhelp/source/com/sun/star/help/HelpSearch.java 
(original)
+++ openoffice/trunk/main/xmlhelp/source/com/sun/star/help/HelpSearch.java Thu 
Dec  5 16:21:20 2013
@@ -273,7 +273,7 @@ public class HelpSearch
 
                        // Perform search
                        TopDocs aHits = searcher.search( aQuery, 100 );
-                       int nHitCount = aHits.totalHits;
+                       int nHitCount = aHits.scoreDocs.length;
 
                        String aDocs[] = new String[nHitCount]; 
                        float aScores[] = null;


Reply via email to