A TEXT index may exclude terms that meet
certain conditions.
TEXT indexes are built according to the
settings defined for the text configuration object used to create
the
TEXT index. A
TEXT index
excludes terms that meet any of the following conditions:
- The term is included in the stop
list.
- The term is shorter than the minimum
term length (GENERIC only).
- The term is longer than the maximum term length.
The same rules apply to query strings. The dropped term can
match zero or more terms at the end or beginning of the phrase.
For example, suppose the term 'the' is in the stop list:
- If the term appears on either side of
an AND, OR, or NEAR, then both the
operator and the term are removed. For example, searching for 'the AND apple', 'the OR
apple', or 'the NEAR apple' are
equivalent to searching for 'apple'.
- If the term appears on the right side
of an AND NOT, both the AND NOT and the term are dropped. For example,
searching for 'apple AND NOT the' is equivalent
to searching for 'apple'.
- If the term appears on the left side of an AND
NOT, the entire expression is dropped. For example, searching for
'the AND NOT apple' returns no rows.
Another example: 'orange and the AND NOT apple'
is the same as 'orange AND (the AND NOT apple)'
which, after the AND NOT expression is
dropped, is equivalent to searching for 'orange'. Contrast this with the search expression '(orange and the) and not apple', which is
equivalent to searching for 'orange and not
apple'.
- If the term appears in a phrase, the
phrase is allowed to match with any term at the position of the dropped term.
For example, searching for 'feed the dog'
matches 'feed the dog', 'feed my dog', 'feed any dog',
and so on.
Note: If all of the terms for which you are searching are dropped,
SAP Sybase IQ returns the error CONTAINS has NULL
search term.SQL Anywhere reports no error and
returns zero rows.