For in-depth descriptions of text configuration object settings and how they impact the contents of a text index and the results returned when querying a text index, see Text configuration object settings.
For a list of all text configuration objects in the database and the settings they contain, query the SYSTEXTCONFIG system
view (for example, SELECT * FROM SYSTEXTCONFIG
). See SYSTEXTCONFIG system view.
SQL Anywhere provides two default text configuration objects, default_nchar and default_char for use with NCHAR and non-NCHAR data, respectively. These configurations are created the first time you attempt to create a text configuration object or text index. If you delete one by mistake, it is recreated the next time you attempt to create a text configuration object or text index.
The settings for default_char and default_nchar at the time of installation are shown in the table below. These settings were chosen because they were best suited for most character-based languages. It is strongly recommended that you do not change the settings in the default text configuration objects.
Setting | Installed value |
---|---|
TERM BREAKER |
0 (GENERIC) |
MINIMUM TERM LENGTH | 1 |
MAXIMUM TERM LENGTH | 20 |
STOPLIST | (empty) |
If you delete a default text configuration object, it is automatically recreated the next time you create a text index or text configuration object. See DROP TEXT CONFIGURATION statement.
The following table shows the settings for different text configuration objects and how the settings impact what is indexed
and how a full text query string is interpreted. All the examples use the string 'I'm not sure I understand'
.
Configuration settings | Terms that are indexed | Query interpretation |
---|---|---|
TERM BREAKER GENERIC MINIMUM TERM LENGTH 1 MAXIMUM TERM LENGTH 20 STOPLIST '' |
|
|
TERM BREAKER GENERIC MINIMUM TERM LENGTH 2 MAXIMUM TERM LENGTH 20 STOPLIST 'not and' |
|
|
TERM BREAKER NGRAM MAXIMUM TERM LENGTH 3 STOPLIST 'not and' |
|
In the case of a fuzzy search:
|
TERM BREAKER GENERIC MINIMUM TERM LENGTH 1 MAXIMUM TERM LENGTH 20 STOPLIST 'not and' |
|
|
TERM BREAKER NGRAM MAXIMUM TERM LENGTH 20 STOPLIST 'not and' |
Nothing is indexed because no term is equal to or longer than 20 characters. This illustrates how differently MAXIMUM TERM LENGTH impacts GENERIC and NGRAM text indexes; on NGRAM text indexes, MAXIMUM TERM LENGTH sets the length of the n-grams inserted into the text index. |
The search returns an empty result set because no n-grams of 20 characters can be formed from the query string. |
The following table provides examples of how the settings of the text configuration object strings are interpreted.
The parenthetical numbers in the Interpreted string column reflect the position information stored for each term. The numbers are for illustration purposes in the documentation. The actual stored terms do not include the parenthetical numbers.
Configuration settings | String | Interpreted String |
---|---|---|
TERM BREAKER GENERIC MINIMUM TERM LENGTH 3 MAXIMUM TERM LENGTH 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TERM BREAKER NGRAM MAXIMUM TERM LENGTH 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TERM BREAKER NGRAM MAXIMUM TERM LENGTH 3 SKIPPED TOKENS IN TABLE AND IN QUERIES |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |