lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@openindex.io>
Subject RE: query bag of word with negation
Date Sun, 22 Apr 2018 19:11:30 GMT
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 <niparisco@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
> 

Mime
View raw message