Thanks SImon ,

Example:

  IndexReader open = IndexReader.open("/tmp/testindex/");
    IndexSearcher searcher = new IndexSearcher(open);
    final String fName = "test";

is fName a field like summary , contents??

    TopDocs topDocs = searcher.search(new TermQuery(new Term(fName,
"lucene")),
        Integer.MAX_VALUE);
am getting an error that search(Query,Filter) method not applicable for
search(TermQuery,int)

    FieldSelector selector = new FieldSelector() {
      public FieldSelectorResult accept(String fieldName) {
        return fieldName == fName ? FieldSelectorResult.LOAD
            : FieldSelectorResult.NO_LOAD;
      }

    };

    final int totalHits = topDocs.totalHits;
    ScoreDoc[] scoreDocs = topDocs.scoreDocs;
    for (int i = 0; i < totalHits; i++) {
      Document doc = searcher.doc(scoreDocs[i].doc, selector);
    }


could you please explain the code , please
-- 
View this message in context: 
http://www.nabble.com/Read-large-size-index-tp24251993p24266289.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to