* at the beginning of search term

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

* at the beginning of search term

Post by skalyanaraman »

We have data of the form

myname@aol.com
yourname@aol.com

and want to do searches like

'*aol.com'
to get both the hits.

We have set qminprelen set to 0, still we could not get the search to return hits.

The data we are testing on is a 15 record table.

we also have allinear='on'.

ANy help would be great.
thanks!!
P.S. also, if we want to search for * literally, what is the escape character? \* does not seem to work.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

* at the beginning of search term

Post by John »

I tried the following with tsql, and both selects
returned the expected rows:

set qminprelen=0;
create table test (x varchar(20));
insert into test values('myname@aol.com');
insert into test values('yourname@aol.com');
insert into test values('myname@hotmail.com');
insert into test values('yourname@hotmail.com');
select * from test where x like '*aol.com';
create metamorph inverted index ix1 on test(x);
select * from test where x like '*aol.com';
drop table test;

There is not an escape for the wildcard.
John Turnbull
Thunderstone Software
skalyanaraman
Posts: 109
Joined: Tue May 29, 2001 9:13 pm

* at the beginning of search term

Post by skalyanaraman »

Thanks.
It is true for us also if I don't have index, the search works.
But, as soon as we create an index on that field, the search does not work. I also figured out that the problem is due to the index expression. Our expressions are,

set delexp=0;set addexp='[\alnum\-#&*@.]{1,30}';set keepnoise='on';set addexp='\alnum{1,99}';set addexp='>>\alpha{1,50},=\alpha{1,50}'

we put in the [\alnum\-#&*@.]{1,30} to get terms like 400- and 400-135B.
and this is the expression that is breaking the *casecentral.com.

Any reason why?

Thanks for all the help!!
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

* at the beginning of search term

Post by Kai »

Remove the asterisk (*) from your index expression. That confuses the index at search time, because asterisk is a reserved character in search terms.
Post Reply