1

Everything is find with Sphnix. I've ony have problem with Turkish characters

Using sphinx-2.2.11 and (2.3 also does not works)

Oracle 11G connection in Sphnix.conf

source db{
Driver={Oracle in OraClient11g_home2};Dbq=ABC-DATABASE-XX:1521/ibbcbs;Uid=ibbcbs;
    type = odbc
    odbc_dsn = DSN=dsn_ABC; Pwd=ABC;Dbq:ABC
    sql_host = XX
    sql_user = XX
    sql_pass = XX
    sql_db = XX
    sql_port = 1521
}

Query like:

 select 
1000000+objectid as GID, 
TO_CHAR(NAME) as NAME,
SDO_UTIL.TO_WKTGEOMETRY(SHAPE) as SHAPE_WKT
from MAHALLE  

I tried very different charset tables for Turkish in Sphnix.conf

charset_table           = A->a, B->b, C->c, U+C7->U+E7, D..G->d..g, U+011E->U+011F, H->h, U+49->U+131, U+130->i, J..O->j..o, U+D6->U+F6, P->p, R..U->r..u, U+15E->U+15F, U+DC->U+FC, X->x, W->w, V->v, Y->y, Z->z, a, b, c, U+E7, d..g, U+11F, h, U+131, i..o, U+F6, p, r..u, U+15F, U+FC, x, w, v, y, z

Original Data: ALANİÇİ

But indexed in Sphinx: ALANIÇI

İ is converted to I somehow. Even If I search same text (ALANIÇI) sphinx does not return any result.

Fatih Alp
  • 209
  • 1
  • 3
  • 11

1 Answers1

0

The issue is because oracle client is not connecting to database as UTF8 so Sphinx Search is not getting data correctly.

To fix this issue set the language for oracle client to TURKISH_TURKEY.UTF8.

On Windows, this can be done by editing registry value for NLS_LANG on registry path Computer\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraClient11g_home1. The path may be different based on oracle client you are using.

Same can be achieved by setting environment variable as mentioned in https://docs.oracle.com/cd/E12102_01/books/AnyInstAdm784/AnyInstAdmPreInstall18.html see heading "For Windows:".

For Unix it can be fixed by setenv NLS_LANG TURKISH_TURKEY.UTF8

After above changes reindex the data and all should be good.