You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by wgggfiy <wu...@qq.com> on 2012/11/22 05:44:43 UTC

how to get payload of a term after IndexSearch.search ?

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.

Re: how to get payload of a term after IndexSearch.search ?

Posted by wgggfiy <wu...@qq.com>.



-----
--------------------------
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-tp4021789p4073708.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

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