: I use solr 3.5 with edismax. I have the following issue with phrase : search. For example if I have three documents with content like : : 1.apache apache : 2. solr solr : 3.apache solr : : then search for apache solr displays documents in the order 1,.2,3 : instead of 3, 2, 1 because term frequency in the first and second : documents is higher than in the third document. We want results be : displayed in the order as 3,2,1 since the third document has exact : match.
you need to give us a lot more info, like what other data is in the various fields for those documents, exactly what your query URL looks like, and what debugQuery=true gives you back in terms of score explanations ofr each document, because if that sample content is the only thing you've got indexed (even if it's in multiple fields), then documents #1 and #2 shouldn't even match your query using the mm you've specified... : <str name="mm">2<-1 5<-2 6<90%</str> ...because doc #1 and #2 will only contain one clause. Otherwise it should work fine. I used the example 3.5 schema, and created 3 docs matching what you described. (with name copyfield'ed into text)... <add> <doc><field name="id">1</field><field name="name">apache apache</field></doc> <doc><field name="id">2</field><field name="name">solr solr</field></doc> <doc><field name="id">3</field><field name="name">apache solr</field></doc> </add> ...and then used this similar query (note mm=1) to get the results you would expect... http://localhost:8983/solr/select/?fl=name,score&debugQuery=true&defType=edismax&qf=name+text&pf=name^10+text^5&q=apache%20solr&mm=1 <result name="response" numFound="3" start="0" maxScore="1.309231"> <doc> <float name="score">1.309231</float> <str name="name">apache solr</str> </doc> <doc> <float name="score">0.022042051</float> <str name="name">apache apache</str> </doc> <doc> <float name="score">0.022042051</float> <str name="name">solr solr</str> </doc> </result> -Hoss