lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wgggfiy <wuqiu.m...@qq.com>
Subject how to get payload of a term after IndexSearch.search ?
Date Thu, 22 Nov 2012 04:44:43 GMT
You know, I do search like below:       Query query = new TermQuery(new
Term(fieldName, *queryString*));       TopDocs topDocs =
searcher.search(query, 100);        int totalHits = topDocs.totalHits;       
System.out.printf("total hit docs=[%d]\n", totalHits);        ScoreDoc[]
scoreDocs = topDocs.scoreDocs;        for(int i=0; i<scoreDocs.length; ++i)       
{            int docID = scoreDocs[i].doc;            Document doc =
searcher.doc(docID);            printDoc(i, docID, doc);        }that's OK,
but my question is after that how can I get the term(&lt;b>queryString*)'s
payload ??thx



-----
--------------------------
Email: wuqiu.main@qq.com
--------------------------
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-get-payload-of-a-term-after-IndexSearch-search-tp4021789.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message