Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-09-28 : 09:11:01
|
| Mark writes "On our website, we log every search performed by our users. We would like to report the most frequently searched terms, and the number of matches that produces. The main problem I've encountered is that the field that actually gets searched is a keyword field that we've full-text indexed. So currently, we perform a query to get the most frequently searched terms, and then a seperate query to find the number of matches for each individual term. This can take up to 20 seconds, which isn't terrible, but I'd like to speed it up if possible by performing a single query instead of 101 queries (1 for the top 100 terms, then 1 for each term). Using a "keywords LIKE '% '+searchItem.value+' %'" syntax is way too slow, and a "CONTAINS(keywords, searchItem.value)" doesn't seem to work because SQL Server demands a string value in the contains statement (as far as I can tell).Somehow, this "feels" like a problem that has an elegant (well, less inelegant) solution, but I can't seem to crack it.Thanks-Mark" |
|
|
|
|
|