Search across virtual columns of which one word is of one letter

Post Reply
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Search across virtual columns of which one word is of one letter

Post by Texis User »

Hi,

I have created a virtual column firstname\lastname.

Any query of type firstname,lastname is run across above virtual column.

If the user enter f, lastname(one letter for firstname), say " U, Webinator " then texis ignores "U" and looks for all relevant data for lastname i.e. "Webinator".

I tried to have quotes added so that the one letter word is not ignored.
But I get error.

Any solution.

Thanks.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Search across virtual columns of which one word is of one letter

Post by John »

Make sure you index one letter words, and decrease the minimum word length.
John Turnbull
Thunderstone Software
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Search across virtual columns of which one word is of one letter

Post by Texis User »

Make sure you index one letter words,--> When we create indexes it does that automatically rt? Do we need to do something more for that.

decrease the minimum word length -->I am doing this

<strlen $last_name>
<$last_name_len =$ret>
<strlen $first_name>
<$first_name_len =$ret>
<!-- Setting minimum length for the entered query -->
<if $first_name_len lte $last_name_len >
<apicp minwordlen $first_name_len>
<else>
<apicp minwordlen $last_name_len>
</if>

Am I missing anything?

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

Search across virtual columns of which one word is of one letter

Post by mark »

Your index expression needs to allow single letter matches. By default it indexes words of 2 or more letters. See addexp.
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Search across virtual columns of which one word is of one letter

Post by Texis User »

I did following

set delexp=0;
set addexp='[\alnum\x80-\xff]{1,99}';
set addexp='>>\digit=[\digit\.+]{1,99}';
set addexp='>>\alnum=[\alnum+\x5C\x5F\x2D\x26\x23\x40\x2E\x25\x2C\X20]{1,99}';
set addexp='\alnum=\x2C\X20{1,30}';

and recreated all the indexes

create metamorph inverted index xpersonname on person_profile (first_name\last_name);

But still it doesnot work. It ignore single character.
And throws this error

'words less than 2 characters (r)' not allowed in query
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Search across virtual columns of which one word is of one letter

Post by mark »

See apicp qminwordlen.
Texis User
Posts: 74
Joined: Thu Jul 13, 2006 8:47 am

Search across virtual columns of which one word is of one letter

Post by Texis User »

Mark,
Post Reply