Consider the following when you write full-text search queries:
You must enclose the operators in angle brackets (<>) in the query. If they are not enclosed in angle brackets, the Full-Text Search engine issues error messages similar to the following:
Msg 20200, Level 15, State 0: Server ‘KRAZYKAT’, Line 1: Error E1-0111 (Query Builder): Syntax error in query string near character 5 Msg 20200, Level 15, State 0: Server ‘KRAZYKAT’, Line 1: Error E1-0114 (Query Builder): Error parsing query: word(tasmanian) Msg 20101, Level 15, State 0: Server ‘KRAZYKAT’, Line 1: VdkSearchNew failed with vdk error (-40). Msg 20101, Level 15, State 0: Server ‘KRAZYKAT’, Line 1: VdkSearchGetInfo failed with vdk error (-11). score copy ----- ------------------------------------------------------------ (0 rows affected) score
You must enclose the Verity language query in single quotes (’) or double quotes ("). The Full-Text Search engine strips off the outermost quotes before it sends the query to Verity. For example, when you enter the query:
...where index_any = "’?own’"
the Full-Text Search engine sends the following query to Verity:
’?own’
A query may be comprised of several “index_any” clauses anded together in SQL. The right and value strings can be prefixed with “<snnn>”. All such strings will be concatenated in Full-Text Search in the order determined by the “nnn” values. The “<snnn>” is removed. For instance:
where index_any=“<s001>hello” and index_any=”<s002> world”
is the same as:
where index_any = “hello world”
This is a handy work-around for search strings that are greater than 255 characters.
Search terms entered in mixed case automatically become case sensitive. Search terms entered in all uppercase or all lowercase are not automatically case sensitive. For example, a query on “Server” finds only the string “Server”. A query on “server” or “SERVER” finds the strings “Server”, “server”, and “SERVER”.
You can use alternative syntax for the query expressions shown in Table 5-4.
Standard Query Expression |
Alternative Syntax |
---|---|
<MANY><WORD>string |
"string" |
<MANY><STEM>string |
’string’ |
When using the alternative syntax, remember that the Full-Text Search engine strips off the outermost quotes before it sends the query to Verity. For example, when you enter the query:
...where index_any = "’play’"
the Full-Text Search engine sends the following query to Verity:
’play’
This is the same as:
<MANY><STEM>play