Trouble with OR connector

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

Trouble with OR connector

Post by jkj2001 »

I'm not sure why this is happening, and was hoping you might be able to point me in the right direction.

This statement returns a count of 7:

tsql "select count(DOCID) from mytable where AUTHOR like '\"Robert Perry\"'"


This next one returns a count of 1:

tsql "select count(DOCID) from mytable where AUTHOR like '\"Bob Perry\"'"



Here's the kicker-- when you combine them with an OR, you get a count of zero:

tsql "select count(DOCID) from mytable where AUTHOR like '\"Bob Perry\"' OR AUTHOR like '\"Robert Perry\"'"


Did I do something wrong? Something with the double-quotes, perhaps?

The AUTHOR field has an inverted metamorph index on it, the syntax of which is this:

tsql "set addexp='>>\alpha{1,50},=\alpha{1,50}';create metamorph inverted index
idxmmytable_AUTHOR on mytable(AUTHOR);"



We're using the Windows NT version of Texis, version 3.01.992447526. Thanks for the help!
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Trouble with OR connector

Post by John »

The OR does a post process to verify the results. You do not have an index expression to match single character words, so it is possible that the records actually have an initial between the first and last name.
John Turnbull
Thunderstone Software
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

Trouble with OR connector

Post by jkj2001 »

Oh, I see.

I thought the quotes around the search terms ("Robert Perry") would have only returned those exact matches, skipping any with middle initials, but I guess not?
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Trouble with OR connector

Post by John »

If the index does not have middle initials indexed, then it does not know they are there. You may want to:

tsql "set delexp=0; set addexp='\alnum{1,30}'; set addexp='>>\alpha{1,50},=\alpha{1,50}';create metamorph inverted index ..."
John Turnbull
Thunderstone Software
Post Reply