Reputation: 1556
I am getting a weird behavior with Solr search results.
I have a lot of documents indexed with a title field.
When I am doing a search over title field solr is not giving higher scores to exact match.
e.g. if my query is "China"
I am getting top documents with titles:
"China House of China Cove"
"National Art Museum of China"
This is weird as there is a document with title "China" and hence that should be the best match for query. Does anyone know what could be wrong here ?
Upvotes: 0
Views: 440
Reputation: 10618
Second to @sohan for the pointer. I'd agree it makes better sense to boost the exact match as in your example. And I hope this might be easier to work around, by indexing the title field again for exact match.
<field name="title" type="text" indexed="true" stored="true" />
<field name="titleExact" type="textExact" indexed="true" stored="true" />
<copyField source="title" dest="titleExact"/>
Above example was taken from this article, which also provides a nice writeup to solve the problem.
Upvotes: 0