Why not use the MultiFieldQueryParser(look at http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/queryParser/MultiFieldQueryParser.html)? This one allow you to specify on which field the search will be done. I think that for your example 'lucene AND jakarta' will be transform by the parser into (+Title1:Lucene +Title1:search) (+Title2:Lucene +Title2:search). Claude Libois
----- Original Message ----- From: "Romain Laboisse" <[EMAIL PROTECTED]> To: <lucene-user@jakarta.apache.org> Sent: Tuesday, March 08, 2005 11:33 AM Subject: Searching multiple fields with same name > Hello, > > I am indexing documents which may have more than one title and I would like > to be able to search these titles separately. > For example, a document may have two titles, "Jakarta Lucene" and "Powerful > search engine". > A search on 'lucene AND jakarta' should return this document but a search on > 'lucene AND search' should not return it. > > Is there a way to achieve this? > > Thanks, > Romain > > > > --------------------------------------------------------------------- > 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]