Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ctx_doc.markup does not highlight text when using wildcards

533607Dec 26 2007 — edited Jan 10 2008
Am using the following code to highlight (in red) the text in documents (both .htm and .doc) when users search with Oracle Text (any parameter not in quotes is a variable value) -

select markup_id.nextval into clob_sequence_num from dual;

ctx_doc.markup
(index_name => 'docs_ctx_redacted_idx',
textkey => p_file,
text_query => query_text,
restab => 'markup_tab_redacted',
query_id => clob_sequence_num,
plaintext => false,
starttag => '<B><FONT COLOR="red">',
endtag => '</B></FONT>');

select document into clob_field
from markup_tab_redacted
where query_id = clob_sequence_num;
loop
dbms_lob.read (clob_field, clob_buffer_size, clob_offset, clob_buffer);
htp.prn (clob_buffer);
clob_offset := clob_offset + clob_buffer_size;
end loop;
dbms_lob.close (clob_field);
end if;

Everything works fine, except when my users use wildcards in their searches. The correct documents are located, but the search strings are not highlighted. (They are highlighted accurately when search terms are defined without using wildcards.) Is there something I can modify to allow terms to be highlighted regardless of whether or not I use wildcards?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2008
Added on Dec 26 2007
11 comments
2,389 views