Page 1 of 1

indexing question

Posted: Wed Jun 01, 2005 5:33 pm
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!

indexing question

Posted: Thu Jun 02, 2005 3:31 pm
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)?

indexing question

Posted: Thu Jun 02, 2005 4:04 pm
by mark
What non-default search settings do you have?

indexing question

Posted: Fri Jun 03, 2005 7:52 pm
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!

indexing question

Posted: Mon Jun 06, 2005 10:53 am
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.