How can I boost the score for documents in which my query matches a particular field earlier. For example, searching for \"super man\" should give \"super man returns\" a hi
Check for options @ Ranking-based-on-term-position
Solved it myself after reading a LOT about this online. What specifically helped me was a reply on nabble which goes like (I used dismax, so explaining that here):
"_START_ <actual data>"
"_START_ <actual query>"
nameString
as one of the fields to look in in the query fields param (qf)nameString
with a phrase slop of 1 or 2 (lower values would mean stricter searching)Your final query params will be something like:
q=_START_ <actual query>
defType=dismax
qf=name nameString /* look in name field as well as nameString field */
pf=nameString /* phrase field in nameString */
ps=2 /* phrase slop */