Skip to content

Commit

Permalink
Added sphinx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
foobar1643 committed Mar 29, 2016
1 parent 225aea8 commit 57958e8
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions sphinx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
source filehosting_src
{
type = pgsql

sql_host = 127.0.0.1
sql_user = root # CHANGEME
sql_pass = qwerty # CHANGEME
sql_db = filehosting
sql_port = 5432 # optional, default is 3306

sql_range_step = 1000
sql_query_range = SELECT MIN(id), MAX(id) FROM files

sql_query = SELECT id, name FROM files WHERE id BETWEEN $start AND $end

sql_field_string = name
}

index index_files {
source = filehosting_src
path = /etc/sphinx/indexes/filehosting_index
docinfo = extern
min_word_len = 3
min_prefix_len = 3
expand_keywords = 1
}

index rt_files {
type = rt
rt_mem_limit = 25M
path = /etc/sphinx/rt/filehosting_rt

rt_field = name

min_word_len = 3
min_prefix_len = 3
expand_keywords = 1
}

indexer
{
mem_limit = 128M
}

searchd
{
listen = 9312
listen = 127.0.0.1:9306:mysql41
log = /var/log/sphinx/searchd.log
query_log = /var/log/sphinx/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinx/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinx/
}

0 comments on commit 57958e8

Please sign in to comment.