Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r327 - trunk/java/ch/idok/service/server/search/lucene

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r327 - trunk/java/ch/idok/service/server/search/lucene


Chronological Thread 
  • From: "AFS account Stadler Hans Christian" <stadler_h AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r327 - trunk/java/ch/idok/service/server/search/lucene
  • Date: Wed, 25 Feb 2009 14:53:39 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: stadler_h
Date: Wed Feb 25 14:53:39 2009
New Revision: 327

Log:
Limit on max returned documents to prevent exception, Integer.MAX_VALUE
doesn't work

Modified:
trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java

Modified:
trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
==============================================================================
--- trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
(original)
+++ trunk/java/ch/idok/service/server/search/lucene/LuceneSearchService.java
Wed Feb 25 14:53:39 2009
@@ -67,6 +67,9 @@
*/
public class LuceneSearchService implements SearchService {

+ /** @brief Maximum amount of documents to return */
+ static final int MAX_DOCS = 300;
+
/** @brief The local logger. */
static final Logger logger = Setup.getInstance().getLogger(
"service.search.lucene");
@@ -420,7 +423,7 @@
TopDocs hits;
try {
searcher = getIndexSearcher(indexDir);
- hits = searcher.search(query, null, Integer.MAX_VALUE);
+ hits = searcher.search(query, MAX_DOCS);
RepoSearch repoSearch = new RepoSearch(this, indexDir,
repo, searcher, hits);
repohits.add(repoSearch);



  • [idok-commit] idok commit r327 - trunk/java/ch/idok/service/server/search/lucene, AFS account Stadler Hans Christian, 02/25/2009

Archive powered by MHonArc 2.6.19.

Top of Page