MultiFieldQueryParser seems to generate what I want : http://hudson.zones.apache.org/hudson/job/Lucene-trunk/javadoc//org/apache/lucene/queryParser/MultiFieldQueryParser.html
But is there a Php version ? On Mon, Oct 6, 2008 at 1:24 PM, KLessou <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to find all documents who contain "France, Flag, French". > > I've got docs like this one : > <doc> > <str name="id">...</str> > <str name="k1_en">wordA,wordB,france, ...</str> > <str name="k2_en">wordA,wordB,flag, ...</str> > <str name="k3_en">wordA,wordB,french, ...</str> > ... > </doc> > > I can't make my query like this : > k1_en:(+france +flag +french)^100 OR k2_en:(+france +flag +french)^10 OR > k3_en:(+france +flag +french) > > So, this only way to do what I want is to generate this query : > > (k1_en:france^100 OR k2_en:france^10 OR k3_en:france) > AND > (k1_en:flag^100 OR k2_en:flag^10 OR k3_en:flag) > AND > (k1_en:french^100 OR k2_en:french^10 OR k3_en:french) > > Is there a better/more simple way to do this ? > > Thx in advance ! > > -- > ~~~~~ > | klessou | > ~~~~~ > -- ~~~~~ | klessou | ~~~~~