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 08:50:29 GMT
Is it correct that Lucene 1.4.2 already had the desired behaviour? It's 
parse method looks like this (MFQP revision 1.4):

     public static Query parse(String query, String[] fields, Analyzer 
analyzer)
	throws ParseException
     {
         BooleanQuery bQuery = new BooleanQuery();
         for (int i = 0; i < fields.length; i++)
         {
             Query q = parse(query, fields[i], analyzer);
             bQuery.add(q, false, false);
         }
         return bQuery;
     }


Chris
--

Otis Gospodnetic wrote:

> I would like that change, as I don't always like queries that MFQP
> creates.
> 
> Otis
> 
> --- Daniel Naber <daniel.naber@t-online.de> wrote:
> 
> 
>>Hi,
>>
>>I'd like to fix MultiFieldQueryParser so that it properly works with
>>AND 
>>queries. Currently it rewrites AND queries so that all terms must
>>appear 
>>in all fields, which rarely makes sense.
>>
>>Eric Jain suggested a new class that works for AND and OR queries:
>>
> 
> http://issues.apache.org/eyebrowse/ReadMsg?listName=lucene-user@jakarta.apache.org&msgId=1798116
> 
>>It seems that his code can just be added to the current 
>>MultiFieldQueryParser class. The current static calls can then all be
>>
>>deprecated (once some feature like setting required/prohibited per
>>field 
>>have been added to the new code).
>>
>>Does anybody see a problem with that?
>>
>>Regards
>> Daniel
>>
>>-- 
>>http://www.danielnaber.de
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-dev-help@jakarta.apache.org
> 


-- 
christiaan.fluit@aduna.biz

Aduna
Prinses Julianaplein 14-b
3817 CS Amersfoort
The Netherlands

+31 33 465 9987 phone
+31 33 465 9987 fax

http://aduna.biz

---------------------------------------------------------------------
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