Text Index returns column name as well [message #614552] |
Fri, 23 May 2014 04:21 |
|
sherlocksher
Messages: 14 Registered: June 2013
|
Junior Member |
|
|
Hi,
When I create a a context index for a multi column data store and use a portion of the column name itself as the text to be searched for, I get all the records in the table. Is there a way to prevent this ?
Please see steps below.
Script is as follows.
create table mult_col ( mult_col1_table clob, mult_col2_table clob);
declare
begin
ctx_ddl.create_preference ('multcollexer', 'BASIC_LEXER');
ctx_ddl.set_attribute ('multcollexer', 'skipjoins', ';:.,()<>*"''#-');
ctx_ddl.create_preference ('mult_colDS', 'MULTI_COLUMN_DATASTORE');
ctx_ddl.set_attribute ('mult_colDS', 'COLUMNS', 'mult_col1_table, mult_col2_table');
end;
INSERT INTO MULT_COL (mult_col1_table,mult_col2_table)
values ( 'ENGINE COMPONENT ASSEMBLY', 'AIRPLANE HANGAR LANDING'
);
create index MULT_COL_idx on MULT_COL (mult_col1_table) indextype is ctxsys.context parameters ('lexer multcollexer datastore mult_colDS') ;
select count(1) from MULT_COL where contains (mult_col1_table,'ENGINE') > 0 -- return a count of 1
select count(1) from MULT_COL where contains (mult_col1_table,'COL1') > 0 -- return a count of 1
Why is the above query that searches for COL1 returning a count of 1 and is there a way to prevent it ?
|
|
|
|