lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams" <ch...@manawiz.com>
Subject RE: Search multiple Fields
Date Thu, 02 Dec 2004 20:34:31 GMT
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:erik@ehatchersolutions.com]
  > 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: lucene-user-unsubscribe@jakarta.apache.org
  > For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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


Mime
View raw message