Page 1 of 1
non alpha-numeric characters in search terms
Posted: Thu Aug 21, 2003 2:46 pm
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!!
non alpha-numeric characters in search terms
Posted: Thu Aug 21, 2003 4:18 pm
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.
non alpha-numeric characters in search terms
Posted: Thu Aug 21, 2003 5:05 pm
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
non alpha-numeric characters in search terms
Posted: Thu Aug 21, 2003 5:29 pm
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)