non alpha-numeric characters in search terms

Post Reply
skalyanaraman
Posts: 109
Joined: Tue May 29, 2001 9:13 pm

non alpha-numeric characters in search terms

Post by skalyanaraman »

Hi,
I am trying to run a search in texis, thru a vortex script.
My search term is "Termination."
(note, no double-quotes).

Do, I have to escape the period? like
<sql "select DOCID from tbldoc where DOCTEXT like 'Termination\.'>

What is the general rule for escaping the non-alphanumeric characters in searches?

Thanks!!
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

non alpha-numeric characters in search terms

Post by mark »

Sentence enders period, comma, and question are always stripped from the end of the query. You can put the term in parens or place a noise term that will get stripped as the last term.
(termination.)
termination. a

Also, if you're going to be searching for words with things like . in them you should adjust your metamorph index expression(s) (addexp) to include them so the index can fully resolve them. Remember to drop and rebuild a metamorph index when changing index expressions.
skalyanaraman
Posts: 109
Joined: Tue May 29, 2001 9:13 pm

non alpha-numeric characters in search terms

Post by skalyanaraman »

Thanks.
So, I don't have to have any escape characters for .,- and so on.

For example,
how would I search,
Case-western
P.hD.

and so on..

Will putting them in paranthesis work all the time?

Thanks for the help
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

non alpha-numeric characters in search terms

Post by mark »

Hyphen is a phrase binder.
case-western
is the same as
"case western"
In general you do nothing special with - in terms of the query or index. There is a hyphenphrase setting that lets you turn off the phrase behavior and treat it litterally though.

Parens will always prevent the trailing .,? removal.

Comma between query words will be treated like space and cause a word break.
abc,def
is the same as
abc def
You can force it to one term with quotes
"abc,def"

To remove the special meaning of * you would have to put the term in a paren list with another non-matching term like (abc*,qjxz)
Post Reply