Hello people:
I'm making a mod to automatically make URLs to search.php to make possible searching fields by direct click on the field's value on the details page.
I added some code to make search.php to take variables from the GET array, and I did put this function to separate the indexed words from the non-indexed ones in the field value:
function create_searchable_words($base) {
$words = split(' ', $base);
foreach ($words as $key => $word) {
if (strlen($word) > MIN_SEARCH_KEYWORD_LENGTH and strlen($word) < MAX_SEARCH_KEYWORD_LENGTH) {
if ($key == 0) {$final_url = $word;}
else {$final_url = $final_url." ".$word;}
}
}
return $final_url;
}
It's working Ok, but I have some problems with the "searchstopterms.txt" words. As you know, the words on that list aren't indexed, even if they enter in the range of MIN_SEARCH_KEYWORD_LENGTH and MAX_SEARCH_KEYWORD_LENGTH .
I think that somewhere in the code there is already a function that makes what I want: separate the searchable words from a string(as the one that I did make), plus removing the words that are at "searchstopterms.txt" from the string.
Anyone knows where it is?.
Thanks in advance.
WR.