KOREAN_MORPH_LEXER Example: Setting Composite Attribute
Use the composite attribute to control how composite nouns are indexed.
NGRAM Example
When you specify NGRAM for the composite attribute, composite nouns are indexed with all possible component tokens. For example, the following composite noun (information processing institute)

Description of the illustration a1rev1.png
is indexed as six tokens:

Description of the illustration a2rev1.jpg

Description of the illustration a3rev1.jpg
Specify NGRAM indexing as follows:
begin
ctx_ddl.create_preference('my_lexer','KOREAN_MORPH_LEXER');
ctx_ddl.set_attribute('my_lexer','COMPOSITE','NGRAM');
end
To create the index:
create index koreanx on korean(text) indextype is ctxsys.context
parameters ('lexer my_lexer');
COMPONENT_WORD Example
When you specify COMPONENT_WORD for the composite attribute, composite nouns and their components are indexed. For example, the following composite noun (information processing institute)

Description of the illustration a1rev1.png
is indexed as four tokens:

Description of the illustration comp1.jpg
Specify COMPONENT_WORD indexing as follows:
begin
ctx_ddl.create_preference('my_lexer','KOREAN_MORPH_LEXER');
ctx_ddl.set_attribute('my_lexer','COMPOSITE','COMPONENT_WORD');
end
To create the index:
create index koreanx on korean(text) indextype is ctxsys.context
parameters ('lexer my_lexer');