48

I install a sphinx search engine a couple months ago, as time pass, I don't remember that sphinx version I installed.

how to check my system sphinx version?

Michael Anderson
  • 70,661
  • 7
  • 134
  • 187
user285020
  • 2,913
  • 4
  • 22
  • 17

9 Answers9

44

May be just run the command searchd without any parameter

It shows following when I just tried

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

....
yAnTar
  • 4,269
  • 9
  • 47
  • 73
YOU
  • 120,166
  • 34
  • 186
  • 219
37

just type in terminal:

sphinx-build --version
Zoe
  • 27,060
  • 21
  • 118
  • 148
priyasha
  • 497
  • 5
  • 4
37

Run searchd with '--help' parameter which show the searchd version:

searchd --help
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff
Iaroslav Vorozhko
  • 1,719
  • 14
  • 12
  • search initially worked for me, but after upgrading an x86-64 package I needed to do `searchd --help` – Jerome Nov 18 '14 at 08:05
8

Here are few ways to do it from python itself:

$ python -c 'import sphinx; print sphinx.__version__'
'1.1.3'

The same of above, with a single instruction variant:

$ python -c 'print __import__("sphinx").__version__'
'1.1.3'

Or, using pkg_resources:

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

The same of above, with a single instruction variant:

$ python -c 'print __import__("pkg_resources").require("sphinx")[0].version'
'1.1.3'
André Anjos
  • 4,641
  • 2
  • 27
  • 34
  • 4
    Wrong sphinx! The question was about the sql search tool sphinx. This did answer my question though. I was looking for the python one, so thanks! :-) – Andrew Hundt Oct 06 '15 at 23:15
5

You can also just connect with the MySQL client.

% 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)

There you have the server version. The --protocol=tcp may be needed if the host is localhost.

Johann Oskarsson
  • 776
  • 6
  • 15
  • This is the version of the MySQL database client that Sphinx is using thus the "--port=9306". The question is "how to check sphinx version?" which can be found from the command line with "searchd" on the Sphinx server. The "searchd" response will include something like "Sphinx 2.2.9-id64-release (rel22-r5006)". This assumes you're running a x86-64 version. – DeeZone Aug 14 '19 at 02:00
  • The version is in the string `Server version: 2.2.7-id64-release (r4883)`. That is the server version of Sphinx. – Johann Oskarsson Aug 15 '19 at 03:04
4

.../sphinx/bin/search

just do it

wxianfeng
  • 41
  • 1
  • 2
    You might want to add a "which search" to your "just do it" instructions as I don't think a typical Sphinx install supports such a command. Perhaps you're looking for "searchd"? – DeeZone Aug 14 '19 at 01:56
0

First go to the directory which have sphinx

run any one of the command

  • search
  • searchd
  • indexer

or

  • indexer --config /home/myuser/sphinx.conf --all
  • indexer --rotate --all
  • 1
    Certainly "searchd" or "indexr" but "search" must be an alias you've setup as that's not a part of a typical Sphinx install. All of the "or" items have nothing to do with the orginal question "how to check sphinx version?" – DeeZone Aug 14 '19 at 01:51
0

Typically within the container running Sphinx:

searchd --status

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'...

This assumes you're running a x86-64 version.

DeeZone
  • 770
  • 7
  • 16
0

Just run command bellow:

searchd --version

Sphinx 3.2.1 (commit f152e0b8)
Copyright (c) 2001-2020, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)

Built on: Linux alpine38 4.14.69-0-vanilla #1-Alpine SMP Mon Sep 10 19:33:23 UTC 2018 x86_64 Linux
Built with: gcc 6.4.0
Build date: Jan 31 2020
Build type: release
Configure flags:  '--enable-dl' '--with-mysql' '--with-pgsql' '--with-unixodbc' 'CXXFLAGS=-DSPHINX_TAG= -DNDEBUG -O3 -g1 -D__MUSL__' 'LDFLAGS=-static-libstdc++ -static-libgcc'
Compiled DB drivers: mysql-dynamic pgsql-dynamic odbc-dynamic

Works only if version 3 and higher

Dmitry Leiko
  • 3,970
  • 3
  • 25
  • 42