lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christiaan Fluit <christiaan.fl...@aduna.biz>
Subject Re: the future of MultiFieldQueryParser
Date Mon, 15 Nov 2004 19:00:22 GMT
Daniel Naber wrote:
> On Monday 15 November 2004 09:50, Christiaan Fluit wrote:
>>Is it correct that Lucene 1.4.2 already had the desired behaviour? It's
>>parse method looks like this (MFQP revision 1.4):
> 
> That version doesn't work as expected for queries where all the terms are 
> required, it parses them in a way so that every term needs to be in every 
> field.

I'm not sure whether we are thinking alike here. Judging from the code 
in 1.4.2, I expect the query "X AND Y" to be evaluated as:

(field1:X AND field1:Y) OR (field2:X AND field2:Y) OR ... (fieldn:X AND 
fieldn:Y)

Is my interpretation of the code correct? If so, then I agree that this 
is somewhat counter-intuitive. When I enter this query, I would except 
it to be evaluated as:

(field1:X OR field2:X OR ... fieldn:X) AND (field1:Y OR field2:Y OR ... 
fieldn:Y)

In other words: both terms have to appear in at least one field of the 
document and this does not necessarily have to be the same field. This 
way it doesn't matter whether the indexer uses one field or several 
fields to index his contents. Would your change result into this behaviour?


Regards,

Chris
--


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


Mime
View raw message