lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allison, Timothy B." <talli...@mitre.org>
Subject RE: Solr search word NOT followed by another word
Date Thu, 15 Feb 2018 18:51:49 GMT
I've been away from the ComplexQueryParser for a while, and I was wrong when I said in my earlier
email that no currently included Solr parse generates a SpanNotQuery.  

You're right, Emir, that the ComplexQueryParser does generate a SpanNotQuery, and, y, I just
tried this with 7.2.1, and it retrieves "Leonardo is the name of Leonardo da Vinci".

However, if fails to retrieve :
a) "Leonardo da is the name of Leonardo da Vinci"
and
b) "Leonardo Vinci is the name of Leonardo da Vinci"

because the SpanNot exclude is a SpanOr ("da" or "vinci") after the rewrite: 

spanNot(name:leonardo, spanNear([name:leonardo, spanOr([name:da, name:vinci])], 0, true),
0, 0)







-----Original Message-----
From: Emir Arnautović [mailto:emir.arnautovic@sematext.com] 
Sent: Tuesday, February 13, 2018 11:23 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr search word NOT followed by another word

Hi Ivan,
Which version of Solr do you use? I’ve just tried it on 6.5.1 and it returned expected.

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



> On 13 Feb 2018, at 16:08, ivan <ivan@presstoday.com> wrote:
> 
> Hi Emir,
> 
> unfortunately that does not work, since i'm not getting a match for my 
> third example ("Leonardo is the name of Leonardo da Vinci") because i 
> have both "Leonardo" and "Leonardo da Vinci" in the same field. I'm 
> fine with having "Leonardo da Vinci" as long as i have another 
> "Leonardo" (NOT followed by da Vinci).
> 
> 
> 
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Mime
View raw message