I indexed a document containing the 'ä' in the word 'Mehlä'. That's an a-umlaut, if it doesn't show up here. I was able to search for the document using tsql, but not using the texisd server and Texis API. After some research, I found that preceding my n_settsql() call with n_dotsql("set locale='en_US.iso-8859-1';") would give me good results via the texisd server as well.
I am now preceding each of my queries with 5 n_dotsql() calls:
iStat = n_dotsql(ptsql, "set locale = 'en_US.iso-8859-1';");
iStat = n_dotsql(ptsql, "set likepleadbias = %d;", gppConfig.nRelevanceBias);
iStat = n_dotsql(ptsql, "set likeprows = %d;", gppConfig.unDbRowLimit);
iStat = n_dotsql(ptsql, "set likepallmatch = 1;");
iStat = n_dotsql(ptsql, "set likeptime = %d;", gppConfig.unDbRankTime);
where gppConfig is a config structure holding several variables.
First question -- Is there a way to set some of these variables at the texisd server level, say in the profile.mm3 file? Each of these n_dotsql() calls sends data across the network, and I'd like to avoid some of them for efficiency reasons.
Some previous posts in this area imply that texisd will use the locale in the environment, but I haven't been able to get that to work. My script calls locale just before starting texisd, and it prints out this:
LANG=en_US.ISO-8859-1
LC_CTYPE="en_US.ISO-8859-1"
LC_NUMERIC="en_US.ISO-8859-1"
LC_TIME="en_US.ISO-8859-1"
LC_COLLATE="en_US.ISO-8859-1"
LC_MONETARY="en_US.ISO-8859-1"
LC_MESSAGES="en_US.ISO-8859-1"
LC_ALL=en_US.ISO-8859-1
That looks right, as far as I can tell, but it doesn't seem to affect texisd. I can only get the 'Mehlä' search to return my document if I set locale from the client.
Second question -- Is there a command that just prints out the values of the various values you can "set"? I'd like to see the values before I start fiddling with them. For example, what's the default "locale" under tsql?
Thanks
Ron
I am now preceding each of my queries with 5 n_dotsql() calls:
iStat = n_dotsql(ptsql, "set locale = 'en_US.iso-8859-1';");
iStat = n_dotsql(ptsql, "set likepleadbias = %d;", gppConfig.nRelevanceBias);
iStat = n_dotsql(ptsql, "set likeprows = %d;", gppConfig.unDbRowLimit);
iStat = n_dotsql(ptsql, "set likepallmatch = 1;");
iStat = n_dotsql(ptsql, "set likeptime = %d;", gppConfig.unDbRankTime);
where gppConfig is a config structure holding several variables.
First question -- Is there a way to set some of these variables at the texisd server level, say in the profile.mm3 file? Each of these n_dotsql() calls sends data across the network, and I'd like to avoid some of them for efficiency reasons.
Some previous posts in this area imply that texisd will use the locale in the environment, but I haven't been able to get that to work. My script calls locale just before starting texisd, and it prints out this:
LANG=en_US.ISO-8859-1
LC_CTYPE="en_US.ISO-8859-1"
LC_NUMERIC="en_US.ISO-8859-1"
LC_TIME="en_US.ISO-8859-1"
LC_COLLATE="en_US.ISO-8859-1"
LC_MONETARY="en_US.ISO-8859-1"
LC_MESSAGES="en_US.ISO-8859-1"
LC_ALL=en_US.ISO-8859-1
That looks right, as far as I can tell, but it doesn't seem to affect texisd. I can only get the 'Mehlä' search to return my document if I set locale from the client.
Second question -- Is there a command that just prints out the values of the various values you can "set"? I'd like to see the values before I start fiddling with them. For example, what's the default "locale" under tsql?
Thanks
Ron