BTS/C-Lucene issues
Posted in 2019
Topics: Storage & Space Management, Stored Procedures & SPL, Data Types & Schema Design, Platform-Specific Issues
Hi All,
Informix 12.10.FC4, on AIX Solaris 10.
My issue concerns an index utilizing BTS. At some points, it returns zero rows
found for every search.... and then some time later, simply starts working
again.
I have tested enough to know that the problem is most likely related to the
C-Lucene engine.
Problem: I have an index using BTS. Here is the creation SQL:
create index bts_name_dtl on name_dtl
(full_nm bts_varchar_ops) using
bts(stopwords="(a,an,as,at,be,by,if,in,is,it,no,of,on,or,s,t,to)")
in bts_sbspace;
Running a search:
Select count(*) from name_dtl where bts_contains(full_nm,Coors) returns 287rows after 5 seconds runtime.
However, our front-end application treats all entered words as partial and
appends a * wildcard behind them:
Select count(*) from name_dtl where bts_contains(full_nm,Coors*) returns 0rows after a split-second runtime.
I am fairly certain the issue occurs when the C-Lucene index attempts to build
a list of possible term matches. It almost seems as if it sees the wildcard
and instead of building a list of matching terms, it just immediately quits.
After an hour or so, without us doing anything noticeable, it starts working
again, and the search with the wildcard starts returning 315 rows as it should.
Has anyone ever seen or heard about behavior like this?
Are there any diagnostics I can run to track down what is causing this, how to
fix it quickly, and how to prevent it in the future?
I have tried removing all sessions utilizing the index, removing all sessions
entirely, restarting the WebSphere servers, even adding more bts VPs.
Thanks,
Michael Hoffman
Colorado Secretary of State
Hi Michael. I think your case is not the "expected behaviour", but this page https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.dbext.doc/i ds_dbxt_184.htm Mentions asterisk as a special character, that can be used, but demands a backslash before it. Please make some tests and see if that fixes your unusual behaviour, ok? HTH Best regards Alexandre Marini
Thanks Alexandre. However, with testing, the backslash simply breaks the query into 2 parts, and then drops the * entirely. So searching for bts_contains(full,"TERM") and bts_contains(full,"TERM\\\\*") return the exact same results. What I expect would be that "TERM\\\\*" returns all TERM, as well as TERMINATION, TERMINAL, etc. as bts_contains(full,"TERM*") does **when it isn't failing**. Thanks, Michael