Sphinxsearch + SQL 服务器 = 未知类型 'mssql';跳绳

Sphinxsearch + SQL Server = unknown type 'mssql'; skipping

我正在尝试从 SQL 服务器索引一些数据,但没有成功:

Ubuntu 16.04

apt-get install sphinxsudo add-apt-repository ppa:builds/sphinxsearch-rel22
apt-get update
apt-get install sphinxsearch

/etc/sphinxsearch/sphinx.conf

source src1
{
        # data source type. mandatory, no default value
        # known types are mysql, pgsql, mssql, xmlpipe, xmlpipe2, odbc
        type = mssql

        #####################################################################
        ## SQL settings (for 'mysql' and 'pgsql' types)
        #####################################################################

        # some straightforward parameters for SQL source types
        sql_host = 192.168.*.*
        sql_user = ****
        sql_pass = ****
        sql_db   = DatabaseName
        sql_port = 1433  # optional, default is 3306
        ...
}

indexer --all

Sphinx 2.2.9-id64-release (rel22-r5006)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'test1'...
ERROR: source 'src1': unknown type 'mssql'; skipping.
ERROR: index 'test1': failed to configure some of the sources, will not index.

毕竟我已经尝试从源代码编译 sphinx,但是在配置文件中没有 with-mssql 选项可用:

 Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-debug            compile slower debug version (default is disabled)
  --with-assert           compile optimized build but with debugging
                          assertions (default is disabled)
  --with-mysql            compile with MySQL support (default is enabled)
  --with-static-mysql     link statically with MySQL library (default is no)
  --with-mysql-includes   path to MySQL header files
  --with-mysql-libs       path to MySQL libraries
  --with-syslog           compile with possibility to use syslog for logging
                          (default is yes)
  --with-pgsql            compile with PostgreSQL support (default is
                          disabled)
  --with-static-pgsql     link statically with PostgreSQL library (default is
                          no)
  --with-pgsql-includes   path to PostgreSQL header files
  --with-pgsql-libs       path to PostgreSQL libraries
  --with-libstemmer       compile with libstemmer support (default is
                          disabled)
  --with-libexpat         compile with expat XML library suppport (default is
                          autodetect)
  --with-re2              compile with RE2 library support (default is
                          disabled)
  --with-re2-includes     path to RE2 header files
  --with-re2-libs         path to RE2 libraries
  --with-rlp              compile with RLP library support (default is
                          disabled)
  --with-iconv            compile with iconv support (default is autodetect)
  --with-unixodbc         compile with UnixODBC support (default is
                          autodetect)

是否有机会让 sphinxsearch 能够索引来自 SQL 服务器的数据?感谢您的关注和解答!祝你有美好的一天!

我认为 MSSQL 驱动程序仅适用于 windows 版本。从历史上看,MSSQL 不适用于 linux,因此该驱动程序从未在 linux 上实现。

也许可以使用 ODBC 驱动程序(我认为是 http://www.unixodbc.org/

找到这个:http://www.unixodbc.org/doc/FreeTDS.html