Full text search: how to sort by relevance?
I am using full text search and on my website it is common for user to search by few word, Author name (1-2 word) and title (1-3 word)...
I need to have something like relevance search and already try to use containstable with Rank but result was very bad.
Also, I try to use ISABO开发者_运维问答UT
with all possible combinations with proper weighting - result is OK but speed is very poor. Search within 4 words and about 30K of rows takes 10-20 seconds.
My query is:
ISABOUT (madonna weight(0.1),messina weight(0.1),"madonna and messina" weight(0.2),virgin weight(0.1),"madonna and virgin" weight(0.2),"messina and virgin" weight(0.2),"madonna and messina and virgin" weight(0.3),child weight(0.1),"madonna and child" weight(0.2),"messina and child" weight(0.2),"madonna and messina and child" weight(0.3),"virgin and child" weight(0.2),"madonna and virgin and child" weight(0.3),"messina and virgin and child" weight(0.3),"madonna and messina and virgin and child" weight(0.4))
Any ideas?
Following simplified query works ok:
ISABOUT (madonna weight(0.1),messina weight(0.1),virgin weight(0.1),child weight(0.1))
It was good intention to highlight combination but this one is also quite good
精彩评论