You would need to explicitly set the surround query parser for this syntax, e.g. with (untested) defType=surround&df=ti&q=3w(car OR bus,kids OR adult).
On Fri, Feb 7, 2025 at 11:11 AM Bruno Mannina <bmann...@matheo-software.com> wrote: > Hi All, > > In my query: 3W(ti:(car OR bus), ti:(kids OR adult)) > > I just saw something. > If I check debugQuery, I can see that 3W is treated like a keyword, not as > an operator?! > > > Cordialement, Best Regards > Bruno Mannina > www.matheo-software.com > www.patent-pulse.com > Mob. +33 0 634 421 817 > > -----Message d'origine----- > De : Bruno Mannina [mailto:bmann...@matheo-software.com] > Envoyé : vendredi 7 février 2025 10:40 > À : solr-u...@lucene.apache.org > Objet : SurroundQuery parser ? Proximity operator. > > Hi all, > > > > I would like to do a query like that: > > (keyword1 OR keyword2 OR KEYWORD3) NEAR THREE WORDS (keyword4 OR keyword5 > OR > keyword6) > > > > I try it on my title field defined like that: > > <field name="ti" type="text_general" multiValued="true" indexed="true" > stored="true" termVectors="true" termPositions="true" termOffsets="true"> > > > > I try the surroundQuery like that: > > > > 3W(ti:(car OR bus), ti:(kids OR adult)) > > > > It works but it gives good and wrong results like that: > > "Protective device of car for kids" : Good > > "Quick bus car washer" : wrong there is no term kids or adult > > > > Do you have an idea how can I perform a query like that ? > > > > Many thanks for your help ! > > > > Cordialement, Best Regards > > Bruno Mannina > > <http://www.matheo-software.com/> www.matheo-software.com > > <http://www.patent-pulse.com/> www.patent-pulse.com > > Mob. +33 0 634 421 817 > > > > > > -- > Cet e-mail a été vérifié par le logiciel antivirus d'Avast. > www.avast.com > >