lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Can I use MatchAllDocsQuery and and specify terms to search in multiple fields of my documents ?
Date Mon, 28 Feb 2011 14:24:19 GMT
A MatchAllDocsQuery simply matches all non-deleted documents exactly as the
name suggests, so what are you trying to do? It makes no sense to add a
restriction to this Query as it returns always everything. The parameter is
only used for scoring to sort the documents according to the boost factor
for the given field name.

If you want to search for multiple terms in different Fields combine one or
more TermQuery in a BooleanQuery.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: aneuryzma [mailto:patrick.diviacco@gmail.com]
> Sent: Monday, February 28, 2011 2:13 PM
> To: general@lucene.apache.org
> Subject: Can I use MatchAllDocsQuery and and specify terms to search in
> multiple fields of my documents ?
> 
> Can I use MatchAllDocsQuery and and specify terms to search in multiple
> fields of my documents ?
> 
> I've seen that this query takes only 1 parameter: MatchAllDocsQuery(String
> normsField), so I was wondering if I can search for multiple terms on
multiple
> fields.
> 
> thanks
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Can-I-
> use-MatchAllDocsQuery-and-and-specify-terms-to-search-in-multiple-fields-
> of-my-documents-tp2594905p2594905.html
> Sent from the Lucene - General mailing list archive at Nabble.com.


Mime
View raw message