Search code examples
solrluceneedismax

solr dismax identify phrase match


I am searching for "i want honda bike" on a text field using edismax query handler.

My intent is to find out docs having "honda bike" in it.

Now the results containing "honda", "bike" and "honda bike". Basically I am not interest in "honda" and "bike". I am actually interested in "honda bike".

Is there any way to identify if the phrase in field has matched the user query?


Solution

  • The problem was IDF was disturbing the score hence I could not fully rely on score to confidently say what has perfectly matched. So I disabled IDF calculation.

    take a look at

    http://lucene.472066.n3.nabble.com/Identify-exact-search-in-edismax-td4011859.html#a4011976