S
S
seredaes2019-10-07 15:36:21
Sphinx
seredaes, 2019-10-07 15:36:21

How to set up sphinx on windows?

Hi all.
On ubuntu everything works fine, but on Windows I can't.
Version 3.
In the folder c:/sphinx
is the config sphinx.conf.in
source src1
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = root
sql_db = testdb
sql_port = 3306
sql_query = \
SELECT id, field1, field2 \
FROM tabletest
sql_attr_uint = field1
}
index search1
{
source = src1
path = C:/sphinx/data/data1
}
indexer
{
mem_limit = 128M
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = C:/sphinx/log/searchd.log
query_log = C:/sphinx/log/query.log
read_timeout = 5
max_children = 30
pid_file = C:\Windows\System32\sphinxdata\searchd .pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = C:/sphinx/log/
}
Indexing is in progress,
C:\Sphinx\bin\indexer --all --config C:\Sphinx \sphinx.conf.in --rotate
PS C:\Windows\system32> C:\Sphinx\bin\indexer --all --config C:\Sphinx\sphinx.conf.in --rotate
Sphinx 3.1.1-dev (commit 612d99f)
Copyright (c) 2001-2018, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc ( http://sphinxsearch.com)
using config file 'C:\Sphinx\sphinx.conf.in'...
indexing index 'registry_lawsuits_search'...
collected 967832 docs, 544.3 MB
sorted 48.3 Mhits, 100.0% done
total 967832 docs, 544.3 Mb
total 24.7 sec, 22.04 Mb/sec, 39194 docs/sec
rotating indices: successfully sent SIGHUP to searchd (pid=6052).
But the query returns false
mysql -h 127.0.0.1 -P9306 I
connected, I enter the query
ERROR 1064 (42000): unknown local index 'search1' in search request I've been
sitting for 3 hours already ... maybe someone has some advice?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Chibirkin, 2019-10-07
@chipaeff

Good afternoon. It may be worth trying to use a backslash
path = C:\sphinx\data\data1 in the config. In Windows, it seems like it is used in paths.

P
Puma Thailand, 2019-10-08
@opium

so you would look at the sphinx logs, well, it’s obvious that if it says no index, then it didn’t pick up your config, but took some other one
, and it’s not clear why the config is called sphinx.conf.IN

A
Anton, 2020-04-28
@aszhitarev

In addition to the indexer, you also need to run the Sphinx process itself - searchd.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question