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 Vishnu Mishra <vd...@gmail.com> on 2013/11/26 15:24:44 UTC

Extract Query terms not by reader, but by using documents

Hi all,
       Is this possible to extract Query Terms for particular Document. The
existing method extractTerms(Set<Term> term) expand the query search over
all the documents (IndexReader) which sometime takes long time to execute,
even I am Interested only in one Document. This case is much critical while
wildcard search.

       Set<Term> matchedTerms = new HashSet<Term>();
       query.rewrite(reader).extractTerms(matchedTerms);

    With this code the Term Set gets populated by the matched query in your
whole index. Is it possible to this with a document instead of the reader?
Something like

query.rewrite(documentId).extractTerms(matchedTerms) 

If anyone have Idea please share with me.

Thanks in advance.



--
View this message in context: http://lucene.472066.n3.nabble.com/Extract-Query-terms-not-by-reader-but-by-using-documents-tp4103308.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