Page 1 of 1

Word Expression

Posted: Tue May 27, 2003 1:49 pm
by mjacobson
I have written a Vortex script that allows my customers to search a Vortex database. The problem I am having is when my users search for things like "T-72".

They will get the results for "T-72" but not results for "T72" or "T 72". All of these are good hits.

If I write the query as '/T=-?"72"=' I can get all of these returns, but the search takes a long time to run. I would also have difficulty trying to get people to use this syntax.

I am using "<sql "set addexp = '[\alnum\/\-]{2,99}'"></sql>" for my word definition. Should this be changed to something else or is there a better way to handle this type of query?

Word Expression

Posted: Tue May 27, 2003 4:39 pm
by John
For the two cases "T-72" and "T 72" and index expression of <SQL "set addexp='[\alnum]{1,99}'"> will work, as the default behaviour of Texis and the Metamorph engine is to treat a hyphen as a phrase connector, and it will also match a space.

You would need to rewrite the query slightly to get the "T72" to match, e.g. "(T 72,T72)" which indicates either the phrase "T 72" or the word T72.