I have an asp page with a text box that feeds a stored procedure that builds a FTS query and displays the results.
If the user types in "category 5", I build this query:
The problem is that combined, the query doesn't return too many rows, but the way the fts handles it, I get this error message
Microsoft OLE DB Provider for SQL Server error '80040e14'
Your search generated too many results. Please perform a more specific search.
/Search/SearchResults.asp, line 317
It seems that the service builds a list of all the items that have "category" and all of the words that have "5". THEN combines the two results to one. If either of these pulls up 20,000 or more (prior to combining), it returns this message. i need for users to be able to search for 9 volt, 5 watt, etc.
Does anyone have a fix/workaround or maybe suggest a better way to write my query?
Thanks!
gordon
If the user types in "category 5", I build this query:
Code:
SELECT TOP 100 Level1Desc, Level1,
Level2Desc, Level2,
Level3Desc, Level3,
Level4Desc, Level4,
Level5Desc, Level5,
Level6Desc, Level6,
COUNT(*) as Total FROM SearchTable
WHERE CONTAINS(SearchText, ' "*category*" AND "*5*" ')
GROUP BY Level1Desc, Level1,
Level2Desc, Level2,
Level3Desc, Level3,
Level4Desc, Level4,
Level5Desc, Level5,
Level6Desc, Level6
ORDER BY Level1Desc, Level2Desc,
Level3Desc, Level4Desc,
Level5Desc, Level6Desc
The problem is that combined, the query doesn't return too many rows, but the way the fts handles it, I get this error message
Microsoft OLE DB Provider for SQL Server error '80040e14'
Your search generated too many results. Please perform a more specific search.
/Search/SearchResults.asp, line 317
It seems that the service builds a list of all the items that have "category" and all of the words that have "5". THEN combines the two results to one. If either of these pulls up 20,000 or more (prior to combining), it returns this message. i need for users to be able to search for 9 volt, 5 watt, etc.
Does anyone have a fix/workaround or maybe suggest a better way to write my query?
Thanks!
gordon