tsql search and indexes

Post Reply
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

tsql search and indexes

Post by jkj2001 »

We've got an index in a database like this:

tsql "set keepnoise='on';set delexp=0;set addexp='\alnum{1,99}';set addexp='>>\a
lpha{1,50},=\alpha{1,50}';create metamorph inverted index idxmtbldoc_DOCTITLEORSUBJECT on tbldoc(DOCTITLEORSUBJECT);"


When we run the following tsql search, it takes forever for any results to come back, which isn't terribly surprising considering our database is 18 GB. However, we have a regular, unique index on the DOCID field, as well as the metamorph index on the DOCTITLEORSUBJECT field:

select count(DOCID) from tbldiscovery where DOCTITLEORSUBJECT like '"E&Y"';


When we run the search, the

count(DOCID)
------------+

Appears quickly, which indicates we're doing a linear search. Do you happen to know if our search term "E&Y" is excluded from any index searching? Thanks. We're on your Solaris version of Texis, version 3.01.984591953
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

tsql search and indexes

Post by Kai »

The index expressions you've given don't entirely match the term `E&Y', because of the ampersand. Only a prefix (`E') is indexable, so actually a post-process search is going on, which is almost as long as a linear search because so many terms start with `E'.

Drop your Metamorph index and re-index with a new expression: change your second expression to the following:

'>>\alpha{1,50}[,&]=\alpha{1,50}'

so it includes ampersands in the middle of words too.

As an aside, the mere fact that the header `count(DOCID)' appears quickly, or the fact that the seach takes some time, does not indicate a linear search is occurring (though the latter is a good bet). tsql allows linear searches and post-processing by default, unlike texis, because it is a command-line admin tool, not a production search program. Therefore it won't say that a linear search is occurring.
If you run the query with texis and its default settings instead (or set alinear=0; set alpostproc=0; in tsql), you'll see the error message "Query would require post-processing" or "linear search" which gives more info on the problem.
Post Reply