IBM® Informix® Excalibur Text Search DataBlade® module, Version 1.31

Exact phrase searches

An exact phrase search returns only phrases that contain all the words in the clue in the exact order that you specify.

To execute an exact phrase search, you set the SEARCH_TYPE tuning parameter to PHRASE_EXACT, as shown in the following example:
SELECT id, description FROM videos
    WHERE etx_contains(description, 
    Row ('multimedia document editor','SEARCH_TYPE = PHRASE_EXACT'));
The following figure displays the resulting hitlist when the query in the example is run on the videos table. Since an exact phrase search with no pattern matching is specified, the document that contains the phrase mulitmedia document editor (mulitmedia intentionally misspelled) is not returned.
Figure 1. Example of exact phrase search
Shows the use of the SEARCH_TYPE tuning parameter for an exact phrase. The hitlist from the videos table is the row that contains the exact phrase: "multimedia document editor."

An exact phrase search for a clue that contains a stopword returns zero rows, even if the clue is contained in a document. This happens only if the etx index ignores stopwords, or in other words, if the index was created with the STOPWORD_LIST index parameter and the stopword list contains one or more words in the clue.

For example, assume that the etx index was created with the index parameter STOPWORD_LIST = 'my_list', and that the stopword list my_list includes the word the. In this case, an exact phrase search for the clue “walk the dog” returns zero rows, even if this exact phrase is contained in a document.

There are two ways to work around this behavior:


Examples exchange | Troubleshooting

To find the PDF, see IBM Informix DataBlade Modules: Publication library in PDF.
For the release notes, documentation notes, and/or machine notes, see the Release Notes page.
timestamp Release date: July 2014