search issue with special character

Post Reply
Priti Barapatre
Posts: 22
Joined: Fri Oct 19, 2007 10:11 am

search issue with special character

Post by Priti Barapatre »

Hi,

we are facing an issue in which the word "Procesní" is used an input query. there is a spcial character "í" in it. I am geeting results from one table where as from another table in which teh data is present I am not getting results in front end. Following are the index expression on tables

fold

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

file

|\alnum{1,30}\digit=[\digit\.+]{1,30}[\alnum\x80-\xff]{1,30}>>\alnum=[\alnum+\x5C\x5F\x2D\x26\x23\x40\x2E\x25\x2C]{1,99}\alnum=\x2C{1,30}

The difference between the two index is "X20" but that stand for the space character. so can you please explain why it should affect the search pattern.

Regards
Priti
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

search issue with special character

Post by mark »

Is the search occuring in the same script using the same apicp and sql set settings?
Was the locale different when either index was created or during the searches?

\alnum may not match "í" or other accented characters if the locale doesn't define them as alphabetic. You might want to include \x80-\xff where you use \alnum to avoid locale issues.
Priti Barapatre
Posts: 22
Joined: Fri Oct 19, 2007 10:11 am

search issue with special character

Post by Priti Barapatre »

Hi Mark,

Both Indexes are used in the same script so the settings remain same for both of them. Regarding locale i am not sure as one of the indexes was created long back, so what Can be the solution for this sort of problem.

Regards
Priti
Priti Barapatre
Posts: 22
Joined: Fri Oct 19, 2007 10:11 am

search issue with special character

Post by Priti Barapatre »

Hi Mark,

I think we have included "alnum\x80-\xff" in the index expression do we need to add itin some other format.

Regards
Priti
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

search issue with special character

Post by John »

If you try:

tsql "set indexaccess=1; select * from INDEXNAME where Word matches 'procesn%'"

replacing INDEXNAME with the name of each index what do you get? Save to a file so you can do a hex dump and see exactly which characters are there.
John Turnbull
Thunderstone Software
Post Reply