lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivan <>
Subject Search for a word NOT followed by another on a Solr query
Date Mon, 12 Feb 2018 11:54:12 GMT
What i'm trying to do is to only get results for "Leonardo" when is not
followed by "da vinci".
If i have "Leonardo da vinci" in my result is fine as long as i have another
"Leonardo" without "da vinci".

"Leonardo foo bar"  OK
"Leonardo da vinci foo bar" KO
"Leonardo foo bar Leonardo da vinci"  OK

I can't seem to find any way to do this using solr queries, because if i do
something like -"Leonardo da vinci" i lose all results where i have both
"Leonardo" and "Leonardo da vinci". I tried using various combinations of
boolean logic but can't get it to work.

Any help?

Sent from:

View raw message