Hi Rob,

One possibility might be to use the IndexReader's termDocs(Term) method 
and then use the skipTo(int) method on the TermDocs object.  Iterate 
over your document list and then your term list for each document.  Each 
time skipTo puts you at the document you are looking for, you can add 
that term to the document's term list.  This probably isn't the most 
efficient method but it should work.

Nathan

Robert A. Decker wrote:

>I've been looking around the org.apache.lucene.search.* code and can't
>seem to find an answer to this.
>
>I would like to present the terms that matched for each document in the
>Hits. For example, to the user it would look like:
>
>***********************************************************
>Search Phrase: double blind study found injections
>Search Terms: (doubl blind studi found inject)
>
>Results:
>Doc1 doubl blind studi found inject
>Doc2 doubl blind studi found inject
>Doc3 doubl blind studi inject
>Doc4 studi inject
>...
>***********************************************************
>
>Is there a way to get the search terms that were used in the relevance
>scoring?
>
>
>thanks,
>rob
>
>http://www.robdecker.com/
>http://www.planetside.com/
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to