Hello Nicolas,

Yes you can! Check out ComplexPhaseQParser
https://lucene.apache.org/solr/guide/6_6/other-parsers.html#OtherParsers-ComplexPhraseQueryParser

Regards,
Markus

 
 
-----Original message-----
> From:Nicolas Paris <nipari...@gmail.com>
> Sent: Sunday 22nd April 2018 20:04
> To: solr-user@lucene.apache.org
> Subject: query bag of word with negation
> 
> Hello
> 
> I wonder if there is a plain text query syntax to say:
> give me all document that match:
> 
> wonderful pizza NOT peperoni
> 
> all those in a 5 distance word bag
> then
> 
> pizza are wonderful -> would match
> I made a wonderful pasta and pizza -> would match
> Peperoni pizza are so wonderful -> would not match
> 
> I tested:
> "wonderful pizza - peperoni"~5
> without success
> 
> Thanks
> 

Reply via email to