Wrong results searching for IP addresses
We have a relatively simple query that looks for IP addresses via a Text Context index:
select doc
from addrtab
where CONTAINS(doc_idx,'192.168.01.%') > 0;
This query returns no rows, even though there are clearly token_text values in the DR#DOC_IDX$I table. The index is built using the WORLD_LEXER, but I see the same results with BASIC_LEXER. The database is 11.2.0.3.
If I change the query to this, simply removing the "." before the "%" in the query string:
select doc
from addrtab
where CONTAINS(doc_idx,'192.168.01%') > 0;
I get the expected rows back, and more, since it now matches on more of the 3rd octets than just "01"....011, 012, etc.