Quick Search Order by Score
Posted: Sat Jul 16, 2005 8:32 pm
My Serendipity version is 0.8.2 at http://diary.jomyut.net
I think if search and ranking it by score , it be better than ranking by timestamp like now. [ My English so bad]
See here ....
file : function_entries.inc.php
function : function serendipity_searchEntries
line 446 : $find_part = "MATCH(title,body,extended) AGAINST('$term' IN BOOLEAN MODE)";
ex. if I type "hello*" in quicksearch it will return entries that have word "hello" , "helloworld" , "helloaaa"
I mean user can specific advance option to search (by use + - * ( ) " ~ )
line 479 : e.exflag,
line 480 : $find_part AS score
line 483 : ORDER BY score DESC
this will ranking word by score.
if you not understand me,you can see http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html
It is very bad when I search word in Thai.Cause Thai language will write by not space (like Iamaboy NOT I am a boy)
You can try by type
องศา
on Quicksearch in http://diary.jomyut.net , I will not found. try again with
*องศา*
You will found many document. but some document not contain "องศา" but it have only "อง".
I want to tell that Can you use PHP to search again? to find that it have องศา not อง in document.
I think if search and ranking it by score , it be better than ranking by timestamp like now. [ My English so bad]
See here ....
file : function_entries.inc.php
function : function serendipity_searchEntries
line 446 : $find_part = "MATCH(title,body,extended) AGAINST('$term' IN BOOLEAN MODE)";
ex. if I type "hello*" in quicksearch it will return entries that have word "hello" , "helloworld" , "helloaaa"
I mean user can specific advance option to search (by use + - * ( ) " ~ )
line 479 : e.exflag,
line 480 : $find_part AS score
line 483 : ORDER BY score DESC
this will ranking word by score.
if you not understand me,you can see http://dev.mysql.com/doc/mysql/en/fulltext-boolean.html
It is very bad when I search word in Thai.Cause Thai language will write by not space (like Iamaboy NOT I am a boy)
You can try by type
องศา
on Quicksearch in http://diary.jomyut.net , I will not found. try again with
*องศา*
You will found many document. but some document not contain "องศา" but it have only "อง".
I want to tell that Can you use PHP to search again? to find that it have องศา not อง in document.