lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claude Libois <claude.lib...@guest.minfin.fed.be>
Subject Re: Searching multiple fields with same name
Date Tue, 08 Mar 2005 12:25:28 GMT
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" <rlaboisse@opsys.fr>
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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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


Mime
View raw message