You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by yinlin chen <gh...@gmail.com> on 2008/10/07 06:24:35 UTC

How can I find the field from search result

Hi,
I use MultiFieldQueryParser to do multiple fields search.
How can I find the particular search result belong to which field(s)?

For example, I use two fields, "creator" and "description"
And I use the keyword "world" to get the search result, how do I know that
keyword "world" is form "creator" or "description"?
Does anyone know how to do it? Thanks for your help.

Regards,

yinlin

Re: How can I find the field from search result

Posted by Chris Hostetter <ho...@fucit.org>.
1) take a look at the Searcher.explain method and the Explanation class.

2) http://people.apache.org/~hossman/#java-dev
Please Use "java-user@lucene" Not "java-dev@lucene"

Your question is better suited for the java-user@lucene mailing list ...
not the java-dev@lucene list.  java-dev is for discussing development of
the internals of the Lucene Java library ... it is *not* the appropriate
place to ask questions about how to use the Lucene Java library when
developing your own applications.  Please resend your message to
the java-user mailing list, where you are likely to get more/better
responses since that list also has a larger number of subscribers.


-Hoss


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