Hi all,
I have taken over a web site. There is a search feature. You enter a word or phrase, and click search. Let's just consider single words for this.
Most words work, and some act peculiar. Here's what happens -
You enter a word, ex. people. Click search.
The results page comes back and states 177 found matches, and since 10 are shown at a time, there are 18 pages of results. The page now showing is page 1. But then click to navigate to any other page and a message comes back that there are no results.
This behavior is happening only for some words - people, animals, states.
Other words that have enough hits to span multiple pages work fine. It is just a few of these words that are problematic. I have been all over the code, and there does not seem to be any reason for this, except that full text searching is involved.
The searching uses "in boolean mode". My best guess at this point it to recreate the full text index. Could that help? I thought I read somewhere that boolean searches are not quite dependent on the index, although that seems like an odd assertion.
But to add confusion - the search word and number of hits are seeded into variables on the initial search. When another result page is clicked, the odd words lose the values of the variables. They become empty. In other words $numresults is 177 but then becomes nothing, and $searchstring becomes nothing.
But another search term - flowers - 110 hits. When another (other than the first page) result page is clicked, it shows up with results, and $numresults still is 110 and $searchstring is still "flowers"
Without delving into code, just on the surface of it, it makes no sense that some words work and some do not. The code is the same either way. The odd words are not in the stopwords. And boolean searches do not care about relevance.
So could it be a problem with the index? It is strange because initially the search works.
All ideas greatly appreciated!
Thanks
KB
I have taken over a web site. There is a search feature. You enter a word or phrase, and click search. Let's just consider single words for this.
Most words work, and some act peculiar. Here's what happens -
You enter a word, ex. people. Click search.
The results page comes back and states 177 found matches, and since 10 are shown at a time, there are 18 pages of results. The page now showing is page 1. But then click to navigate to any other page and a message comes back that there are no results.
This behavior is happening only for some words - people, animals, states.
Other words that have enough hits to span multiple pages work fine. It is just a few of these words that are problematic. I have been all over the code, and there does not seem to be any reason for this, except that full text searching is involved.
The searching uses "in boolean mode". My best guess at this point it to recreate the full text index. Could that help? I thought I read somewhere that boolean searches are not quite dependent on the index, although that seems like an odd assertion.
But to add confusion - the search word and number of hits are seeded into variables on the initial search. When another result page is clicked, the odd words lose the values of the variables. They become empty. In other words $numresults is 177 but then becomes nothing, and $searchstring becomes nothing.
But another search term - flowers - 110 hits. When another (other than the first page) result page is clicked, it shows up with results, and $numresults still is 110 and $searchstring is still "flowers"
Without delving into code, just on the surface of it, it makes no sense that some words work and some do not. The code is the same either way. The odd words are not in the stopwords. And boolean searches do not care about relevance.
So could it be a problem with the index? It is strange because initially the search works.
All ideas greatly appreciated!
Thanks
KB