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 Rohit Banga <ia...@gmail.com> on 2010/03/10 18:11:57 UTC

examples of using explain method

Could you help me understand how to use the explain method:
http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/Searcher.html#explain%28org.apache.lucene.search.Query,%20int%29

I was wondering if I could use it to find out which terms in my query
matched against a particular document.
I am using fuzzy matching with the QueryParser.

Thanks

Rohit Banga

Re: examples of using explain method

Posted by Rohit Banga <ia...@gmail.com>.
yes i have printed the output to screen and used Luke to see what explain
does.

"I was wondering if I could use it to find out which terms in my query
 matched against a particular document.
 I am using fuzzy matching with the QueryParser."

On Wed, Mar 10, 2010 at 11:56 PM, Erick Erickson <er...@gmail.com>wrote:

> Have you tried System.out.println(searcher.explain(blah blah).toString());?
>
> Also, Luke will do a  lot of this for you, google Lucene Luke....
>
> HTH
> Erick
>
> On Wed, Mar 10, 2010 at 12:11 PM, Rohit Banga <iamrohitbanga@gmail.com
> >wrote:
>
> > Could you help me understand how to use the explain method:
> >
> >
> http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/Searcher.html#explain%28org.apache.lucene.search.Query,%20int%29
> >
> > I was wondering if I could use it to find out which terms in my query
> > matched against a particular document.
> > I am using fuzzy matching with the QueryParser.
> >
> > Thanks
> >
> > Rohit Banga
> >
>



-- 
Rohit Banga
http://www.google.com/profiles/iamrohitbanga

Re: examples of using explain method

Posted by Erick Erickson <er...@gmail.com>.
Have you tried System.out.println(searcher.explain(blah blah).toString());?

Also, Luke will do a  lot of this for you, google Lucene Luke....

HTH
Erick

On Wed, Mar 10, 2010 at 12:11 PM, Rohit Banga <ia...@gmail.com>wrote:

> Could you help me understand how to use the explain method:
>
> http://lucene.apache.org/java/3_0_1/api/core/org/apache/lucene/search/Searcher.html#explain%28org.apache.lucene.search.Query,%20int%29
>
> I was wondering if I could use it to find out which terms in my query
> matched against a particular document.
> I am using fuzzy matching with the QueryParser.
>
> Thanks
>
> Rohit Banga
>