In OracleText, diacritics are treated as separate characters by default. For example, searching for the word Daniel will not find Daniél. The full-text index can be configured to transform letters with diacritics to regular letters by enabling a setting on the lexer.
By default, Blueriq uses the |
A custom lexer that transforms letters with diacritics to their normal counterparts must be created as follows:
begin ctx_ddl.create_preference('example_lexer', 'BASIC_LEXER'); ctx_ddl.set_attribute('example_lexer', 'base_letter', 'yes'); -- yes = transform diacritics, no = do not transform diacritics end; |
The custom lexer is specified as an index parameter:
drop index aq_fulltext_index; create index aq_fulltext_index on aq_fulltext(text) indextype is ctxsys.context parameters ('datastore aq_fulltext_uds lexer example_lexer sync(every "sysdate+1/24")'); |
The lexer can also be changed without dropping the index first:
alter index aq_fulltext_index parameters ('replace metadata lexer example_lexer'); alter index aq_fulltext_index rebuild; |
For this option, the following points need to be taken into consideration:
Related articles appear here based on the labels you select. Click to edit the macro and add or change labels. Note: the article itself also appears as related article, this is a known limitation.