I want to add simple full-search-text to my webapp, that can accept multiple words to search.
Example search entry: “Online SQL books”
Should I transform it to:
WHERE (CONTAINS(myColumn, '"Online*" and "sql*" and "books*"' ))
or : WHERE (CONTAINS(myColumn, '"Online* sql* books*"' ))
or maybe: WHERE (CONTAINS(myColumn, '"Online*"' )) and (CONTAINS(myColumn, '"SQL*"' )) and (CONTAINS(myColumn, '"books*"' ))
or maybe it’s better to use ‘FORMSOF(INFLECTIONAL(‘…
Another question where it’s better to construct the query, inside store procedure on inside my business object and then pass it to the stored procedure?
The first form is well (CONTAINS(myColumn, ‘”Online*” and “sql*” and “books*”‘ )) – sql anyway spent time to parse query.
Second question is matter of convenience. If you well with string manipulation in sql2005, then do it. But remember on sql-injection problem, so check twice.