That's called phrase query - selecting documents based on the order of the
terms. Just enclose the terms in quotes.
-- Jack Krupansky
-----Original Message-----
From: Tomer Levi
Sent: Monday, September 29, 2014 2:41 AM
To: solr-user@lucene.apache.org
Subject: RE: multiple terms order in query - eDismax
Thanks Jack!
Do you have any idea how can I select documents according to the appearance
order of the terms?
-----Original Message-----
From: Jack Krupansky [mailto:j...@basetechnology.com]
Sent: Sunday, September 28, 2014 1:27 PM
To: solr-user@lucene.apache.org
Subject: Re: multiple terms order in query - eDismax
pf and ps merely control boosting of documents, not selection of documents.
mm controls selection of documents.
So, hopefully at least doc3 is returned before doc2.
-- Jack Krupansky
From: Tomer Levi
Sent: Sunday, September 28, 2014 5:39 AM
To: solr-user@lucene.apache.org
Subject: multiple terms order in query - eDismax
Hi,
We have an index with 3 documents, each document contains a single field let’s
call it ‘text’ (except the id) as below:
· Doc1
o text:home garden sky sea wolf
· Doc2
o text:home wolf sea garden sky
· Doc3
o text:wolf sea home garden sky
When executing the query: home garden apple,
Using eDismax params:
· pf=text
· ps=1
· mm=2
We would like to get Doc1 and Doc3, in other words all the documents having
at least 2 terms in close proximity (only 1 term off).
The problem is that we get all 3 documents, it looks like the ‘ps’ parameter
doesn’t count.
Why Doc2 included in the results? We expected that Solr will emit it since
the ‘ps’ is larger than 1 => we have home wolf sea garden (ps=2?)
Tomer Levi
Software Engineer
Big Data Group
Product & Technology Unit
(T) +972 (9) 775-2693
tomer.l...@nice.com
www.nice.com