我试图通过UnixODBC在Firebird上使用Sphinx Search。所有组件分别正常工作:Sphinx通过MySQL样本测试,ODBC连接到firebird的.fdb
但是如果我尝试将Sphinx连接到ODBC,我会收到这个索引错误:
错误:索引' fb':sql_connect:[unixODBC] [ODBC Firebird 驱动程序]不可用的数据库(DSN = odbc://:*** @:0 /)。
这是我的sphinx.conf的一部分:
source src_fb
{
type=odbc
odbc_dsn=Driver=/usr/lib/libOdbcFb.so;Dbq=localhost:/var/lib/firebird/2.5/data/employee.fdb;Uid=SYSDBA;Pwd=
sql_query = \
SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \
FROM documents
}
.fdb与ODBC连接的文件相同。
答案 0 :(得分:1)
以下是解决方案: 在sphinx.conf中我只更改了一个字符串: odbc_dsn = DSN =雇员
现在,Sphinx从ODBC配置文件中获取所有必需的数据。
来自odbc.ini的数据库:
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: bookStore.exe
Problem Signature 02: 1.0.0.0
Problem Signature 03: 588c3a92
Problem Signature 04: Microsoft.VisualBasic
Problem Signature 05: 12.0.51209.34209
Problem Signature 06: 5348c443
Problem Signature 07: 32b
Problem Signature 08: 21d
Problem Signature 09: System.InvalidCastException
OS Version: 6.1.7601.2.1.0.768.2
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Read our privacy statement online:
http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
驱动程序配置来自odbcinst.ini:
[employee]
Description = Firebird
Driver = Firebird
Dbname = localhost:/var/lib/firebird/2.5/data/employee.fdb
User = SYSDBA
Password =
Role =
CharacterSet =
ReadOnly = No
NoWait = No