mysql - designing a website database search using FULLTEXT -


i'm in process of writing search function website. there multiple tables have search through query, each different level of importance.

here current idea on query

select id table1 match(name) against('keyword') union select id table2 match(name) against('keyword') ... ... 

one of issues ran prioritizing results match keyword on others. example, if have:

id - name 1 - central park 2 - park 

if fulltext search on keyword park, evaluate both of them have same relevance. want 2 - park on top of results. guess can solve problem ordering length(name), there way around it?

this page has great info on scoring natural language search results.

http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -