Search like google with + and -
Posted: 30 Nov 2006, 17:28
In our software department we make some good changes, one of this change is search like google, with + and - for the search....
it is realy pretty to work with that: (Version 1.01)
// * Old Function *
First found line 710 in /core/filter_api.php
// * New Function *
# Simple Text Search - Thanks to Alan Knowles
i
an new Version comes tomorrow...but i hope that is ok...
it is realy pretty to work with that: (Version 1.01)
// * Old Function *
Code: Select all
$t_textsearch_where_clause = "((summary LIKE '%$c_search%')
OR ($t_bug_text_table.description LIKE '%$c_search%')
OR ($t_bug_text_table.steps_to_reproduce LIKE '%$c_search%')
OR ($t_bug_text_table.additional_information LIKE '%$c_search%')
OR ($t_bug_table.id = '$c_search_int'))";
$t_textsearch_wherejoin_clause = "((summary LIKE '%$c_search%')
OR ($t_bug_text_table.description LIKE '%$c_search%')
OR ($t_bug_text_table.steps_to_reproduce LIKE '%$c_search%')
OR ($t_bug_text_table.additional_information LIKE '%$c_search%')
OR ($t_bug_table.id LIKE '%$c_search%')
OR ($t_bugnote_text_table.note LIKE '%$c_search%'))";
*/First found line 710 in /core/filter_api.php
// * New Function *
# Simple Text Search - Thanks to Alan Knowles
i
Code: Select all
f ( !is_blank( $t_filter['search'] ) ) {
$c_search = db_prepare_string( $t_filter['search'] );
$c_search_int = db_prepare_int( $t_filter['search'] );
$t_textsearch_where_clause = "( MATCH (summary,$t_bug_text_table.description,$t_bug_text_table.steps_to_reproduce,$t_bug_text_table.additional_information) AGAINST ('$c_search' IN BOOLEAN MODE) OR $t_bug_table.id='$c_search_int' )";
$t_textsearch_wherejoin_clause = "( MATCH (summary,$t_bug_text_table.description,$t_bug_text_table.steps_to_reproduce,$t_bug_text_table.additional_information,$t_bugnote_text_table.note) AGAINST ('$c_search' IN BOOLEAN MODE) OR $t_bug_table.id LIKE '%$c_search%' )";