2

I'm still a relative newbie with Solr Lucene, and I have noticed an interesting "problem" with a search I performed.

If I do a basic search for "responsive", I also get results that contains the word "responsible".

I suppose this is OK, but the problem is the result with the keyword I was looking for (responsive) appears BELOW the result that contain the keyword I was NOT looking for! (responsible).

Granted, the result with "responsible" has more keyword matches, but the fact remains I did not search for this.

I like this alternative word/synonym feature, but is there a setting I should look for to make sure results with the actual search keyword are ranked higher than the alternatives?

Many thanks in advance, much appreciated. Seb

seb835
  • 467
  • 1
  • 5
  • 19

2 Answers2

3

The stemmer you have in the fields seems to be stemming responsive & responsible to the same root.
Solr does not out of box rank the actual matches more than the alternatives.

If you want the actual search words to be ranked higher than the alternatives, you would need to maintain both stemmed and unstemmed versions of the field, and add more weight to the unstemmed version than the stemmed versions.

Jayendra
  • 52,349
  • 4
  • 80
  • 90
  • Sounds interesting. How would a newbie like myself achieve this? – seb835 Sep 22 '11 at 14:25
  • Will try to put up some information on it. Other options would be to use no stemming at all or use a less aggressive stemmer (available with solr) which would not produce unpredictable results as above. – Jayendra Sep 22 '11 at 15:45
  • added some details - http://stackoverflow.com/questions/7722649/boost-result-by-specified-search-term-on-top/7723231#7723231 – Jayendra Oct 11 '11 at 13:51
0

which ranking algorithm is it using? you must modify the ranking algorithm function.

orezvani
  • 3,595
  • 8
  • 43
  • 57