Hello Aerik,
Aerik Sylvan wrote:
I wrote a "suggest" function for finding
part numbers for a request form at
work - enabling multi-word search is really useful and powerful. I haven't
looked at your code, so I don't know if you're using a keyword index, or
LIKE SQL functions. I set mine up to require at least 4 characters and to
to break on whitespace, so the SQL (pseudocode) is WHERE LIKE(wordone) AND
LIKE(wordtwo) and so on.
With this solution, you will not be able to handle a lot of queries per
second (it will probably take more than 1 second to query 2.3 millions
of entries). If you use a trie (yes I know this word now :)), everything
is pre-computed and a query will use very few cpu and you will be able
to handle a lot of queries per second.
Best Regards.
Julien Lemoine