Text Search skiping HTML tags
ratinaMar 24 2010 — edited Apr 4 2010I have a table containing clob column.
select code, details from search order by code;
CODE DETAILS
---------- -------------------------------------------------------
4 just a <b>test </b>insert
5 just a <b>test</b> insert
9 <HTML>just a <i>test</i> insert</HTML>
10 checking test insert
I have created a context index and add html tags in the stop list.
exec ctx_ddl.create_stoplist('mystop', 'BASIC_STOPLIST');
exec ctx_ddl.add_stopword('mystop', '<b>');
exec ctx_ddl.add_stopword('mystop', '</b>');
CREATE INDEX searchi ON search(details)
INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS
('FILTER CTXSYS.AUTO_FILTER SECTION GROUP CTXSYS.AUTO_SECTION_GROUP STOPLIST MYSTOP');
But when I search 'test insert' it only shows the following rows
SQL> SELECT score(1), code, details FROM search WHERE CONTAINS(details, 'test insert', 1) > 0 ORDER BY score(1);
SCORE(1) CODE DETAILS
---------- ---------- --------------------------------------------------------------------------------
5 10 checking test insert
5 9 <HTML>just a <i>test</i> insert</HTML>
I would like to define a text index which skips the html keywords and returns all the rows contain the searching phrase