lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emir Arnautović <emir.arnauto...@sematext.com>
Subject Re: Search for a word NOT followed by another on a Solr query
Date Mon, 12 Feb 2018 21:22:33 GMT
Hi Ivan,
You might be able to use complexphrase query parser to get what you need, you can test something
like this:

{!complexphrase df=my_field}”Leonardo -(da Vinci)”

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 12 Feb 2018, at 14:29, ivan <ivan@presstoday.com> wrote:
> 
> Markus Jelsma-2 wrote
>> You can abuse phrase query for that, q=leonardo AND -"leonardo da vinci"
>> (asuming you have a proper default field set).
>> 
>> Markus
> 
> This way i'm losing results where i have both "Leonardo" and "Leonardo da
> vinci in the same field, see example number 3 "Leonardo foo bar Leonardo da
> vinci".
> I want this case to match and with your query i'm not getting it.
> 
> 
> 
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Mime
View raw message