If you want this to be efficient in your application, I'd suggest
integrating at a lower level.  E.g., take a look at TermScorer.explain()
to see how it determines whether or not a term matches in a field of
document.

Another approach might be to specialize BooleanQuery to keep track of
which clauses matched.

Chuck

  > -----Original Message-----
  > From: Erik Hatcher [mailto:[EMAIL PROTECTED]
  > Sent: Thursday, December 02, 2004 12:13 PM
  > To: Lucene Users List
  > Subject: Re: Search multiple Fields
  > 
  > 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: [EMAIL PROTECTED]
  > For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to