You can now execute queries using the defined topic instead of a complex query. For example, before you create the “saint-bernard” topic, you would have to use the following syntax:
...where i.index_any = "<accrue> ([80]Saint Bernard, [80]St. Bernard, working dogs, large dogs, European breeds)"
to find documents that:
Contain one or more of the following phrases: “Saint Bernard,” “St. Bernard,” “working dogs,” “large dogs,” and “European breeds”
Score documents containing the phrase “Saint Bernard” or “St. Bernard” higher than documents containing the phrase “working dogs,” “large dogs,” or “European breeds”
After you create the topic “saint-bernard”, you can use this syntax:
...where i.index_any = "<topic>saint-bernard"
or:
...where i.index_any = "saint bernard"
If you enter a word in a query expression, the Enhanced Full-Text Search engine tries to match it with a topic name. If you enter a phrase in a query expression, the Enhanced Full-Text Search engine replaces spaces with hyphens (-), and then tries to match it with a topic name. For example, the Enhanced Full-Text Search engine matches “saint bernard” with the topic “saint-bernard”.
See the sample_text_topics.sql file for examples of using topics in queries.