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 Eric Louvard <er...@hauk-sasko.de> on 2004/12/02 17:43:03 UTC

Search multiple Fields

I'm searching, for example

title:world OR contents:world OR author:world

Is it possible to know where (in which Field) have Lucene found 'world' in each Document,
without making 3 queries ?

Thanks.





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


Re: Search multiple Fields

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Dec 2, 2004, at 11:43 AM, Eric Louvard wrote:
> I'm searching, for example
>
> title:world OR contents:world OR author:world
>
> Is it possible to know where (in which Field) have Lucene found 
> 'world' in each Document,
> without making 3 queries ?

Not in a straightforward way, but you can dig through the Explanation 
returned from IndexSearcher.explain() to see what factors are involved 
in the score, which does include info on what fields/terms were 
matched.

	Erik


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