Sphinx 如何检查斯芬克斯版本?

Sphinx 如何检查斯芬克斯版本?,sphinx,Sphinx,几个月前我安装了一个sphinx搜索引擎,随着时间的推移,我不记得我安装的sphinx版本了 如何检查我的系统sphinx版本 可以只运行命令searchd,不带任何参数 当我刚刚尝试时,它显示了以下内容 Sphinx 0.9.9-release (r2117) Copyright (c) 2001-20009, Andrew Aksyonoff .... …/sphinx/bin/search 只需执行此操作使用“--help”参数运行searchd,该参数显示searchd版本: sea

几个月前我安装了一个sphinx搜索引擎,随着时间的推移,我不记得我安装的sphinx版本了


如何检查我的系统sphinx版本

可以只运行命令
searchd
,不带任何参数

当我刚刚尝试时,它显示了以下内容

Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-20009, Andrew Aksyonoff

....
…/sphinx/bin/search

只需执行此操作

使用“--help”参数运行searchd,该参数显示searchd版本:

searchd --help
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

以下是从python本身实现这一点的几种方法:

$ python -c 'import sphinx; print sphinx.__version__'
'1.1.3'
与上述相同,使用单个指令变量:

$ python -c 'print __import__("sphinx").__version__'
'1.1.3'
$ python -c 'print __import__("pkg_resources").require("sphinx")[0].version'
'1.1.3'
或者,使用
pkg_资源

$ python -c 'import pkg_resources; print pkg_resources.require("sphinx")[0].version'
'1.1.3'
与上述相同,使用单个指令变量:

$ python -c 'print __import__("sphinx").__version__'
'1.1.3'
$ python -c 'print __import__("pkg_resources").require("sphinx")[0].version'
'1.1.3'

您也可以只连接MySQL客户端

% mysql --host=sphinx.example.com --port=9306 --protocol=tcp
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 2.2.7-id64-release (r4883)

这就是服务器版本。如果主机是本地主机,则可能需要
--protocol=tcp

只需键入终端:


sphinx build--version

首先转到包含sphinx的目录

运行任意一个命令

  • 搜寻
  • 搜索
  • 索引器

  • 索引器--config/home/myuser/sphinx.conf--all
  • 索引器--旋转--全部

通常在运行Sphinx的容器内:

searchd——状态

root@453ba3cefef3:/# searchd --status
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'...

这假设您运行的是x86-64版本。

search最初对我有效,但升级x86-64软件包后,我需要执行
searchd--help
错误的sphinx!问题是关于sql搜索工具sphinx的。这确实回答了我的问题。我在找python版本,所以谢谢!:-)当然“searchd”或“indexr”,但“search”必须是您设置的别名,因为它不是典型Sphinx安装的一部分。所有的“或”项与最初的问题“如何检查sphinx版本?”无关,您可能希望在“just do it”说明中添加“What search”,因为我认为典型的sphinx安装不支持这样的命令。也许您正在寻找“searchd”?这是Sphinx使用的MySQL数据库客户端的版本,因此“-port=9306”。问题是“如何检查sphinx版本?”可以在sphinx服务器上带有“searchd”的命令行中找到。“searchd”响应将包括类似“Sphinx2.2.9-id64-release(rel22-r5006)”的内容。这假定您正在运行x86-64版本。该版本位于字符串
服务器版本:2.2.7-id64-release(r4883)
中。这是Sphinx的服务器版本。