indexing question

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

indexing question

Post by jkj2001 »

We have an index on one of our fields that was created in this manner:

tsql -q "set keepnoise='on';set delexp=0;set addexp='\punct{1,5}';set addexp='\a
lnum{1,99}';set addexp='>>\alpha{1,50},=\alpha{1,50}';create metamorph inverted
index.........

When we run a search for something along the lines of "select * from mytable where myfield like 'a-6253'" it takes a long time to return. Linear search times.

I took the liberty querying against the index above, and in the Word column I saw entries for "-", for "a", but not for "6253". I assume its absence is the reason the search takes so long? If so, would you know by chance why it's not in the index? We're using Texis version 4.04.1067366033 if it helps to know. Thanks!
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

indexing question

Post by Kai »

Can't see offhand why it would take long. Disable post-processing and linear searches in the tsql with:

set allinear=0; set alpostproc=0; select * ...

and see if any messages appear.

Does a search for just 6253 return immediately (with no rows)?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

indexing question

Post by mark »

What non-default search settings do you have?
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

indexing question

Post by jkj2001 »

Hmm...something new is happening now. We dropped and recreated the index, using the index statement at the top. Now when I run my search ("select * from mytable where myfield like 'a-6253'") I get zero hits, immediately.

If I run the search without the dash ('a 6253') the hits come back fast and furious. Both the "a" and "6253" are in the index by themselves. So is the dash.

Is there a way to run my select statement with the dash in it, and get the hits back? I've tried 'a\-6253' for instance, in an weak attempt to escape the dash, but no dice.

Mark, in response to your question, I'm not sure what you mean by non-default search settings-- could you elaborate? Thanks guys!
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

indexing question

Post by mark »

sql set or <apicp> statements that change search behavior.

Either don't index hyphen or turn hyphenphrase off and add an expression to index hyphenated words.
Post Reply