lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomer Levi <>
Subject RE: multiple terms order in query - eDismax
Date Mon, 29 Sep 2014 06:41:41 GMT
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 [] 
Sent: Sunday, September 28, 2014 1:27 PM
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
Subject: multiple terms order in query - eDismax


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

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




View raw message