-
Notifications
You must be signed in to change notification settings - Fork 0
/
sphinx.conf
148 lines (128 loc) · 3.94 KB
/
sphinx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# This file will be generated using Emacs Lisp, don't modify it
# unless you know what you are doing.
source base
{
type = mysql
# some straightforward parameters for SQL source types
sql_host = 127.0.0.1
sql_user = emacs
sql_pass = emacs
sql_db = emacs_user
sql_port = 3306 #default is 3306
}
source emacs_user_documents : base
{
# main document fetch query
# mandatory, integer document ID field MUST be the first selected column
sql_query = \
SELECT \
documents.id AS id, \
documents.document AS document \
FROM documents \
WHERE \
documents.id >= $start and documents.id <= $end \
# range query setup, query that must return min and max ID values
# optional, default is empty
#
# sql_query will need to reference $start and $end boundaries
# if using ranged query:
#
# sql_query = \
# SELECT doc.id, doc.id AS group, doc.title, doc.data \
# FROM documents doc \
# WHERE id>=$start AND id<=$end
#
sql_query_range = SELECT MIN(id), MAX(id) FROM documents
sql_file_field = document
sql_field_string = document
# ranged query throttling, in milliseconds
# optional, default is 0 which means no delay
# enforces given delay before each query step
sql_ranged_throttle = 0
}
# source info
# {
# type = xmlpipe2
# xmlpipe_command = emacsclient -e '(sphinx-info-build-index)'
# }
source emacs_user_info : base
{
type = mysql
sql_query = \
SELECT \
info.id AS id, \
info.node AS node, \
info.contents AS contents \
FROM info \
WHERE \
info.id >= $start and info.id <= $end \
sql_query_range = SELECT MIN(id), MAX(id) FROM info
sql_field_string = node
sql_field_string = contents
sql_ranged_throttle = 0
}
index emacs_user
{
type = plain
# document source(s) to index
# multi-value, mandatory
# document IDs must be globally unique across all sources
source = emacs_user_documents
# a list of morphology preprocessors to apply
# optional, default is empty
#
# builtin preprocessors are 'none', 'stem_en', 'stem_ru', 'stem_enru',
# 'soundex', and 'metaphone'; additional preprocessors available from
# libstemmer are 'libstemmer_XXX', where XXX is algorithm code
# (see libstemmer_c/libstemmer/modules.txt)
#
# morphology = stem_en, stem_ru, soundex
# morphology = libstemmer_german
# morphology = libstemmer_sv
morphology = stem_en
# index files path and file name, without extension
# mandatory, path must be writable, extensions will be auto-appended
path = /home/wvxvw/.emacs.d/sphinx/var/data/user_documents
# minimum indexed word length
# default is 1 (index everything)
min_word_len = 1
preopen = 1
# whether to strip HTML tags from incoming documents
# known values are 0 (do not strip) and 1 (do strip)
# optional, default is 0
html_strip = 0
# index sentences
index_sp = 1
}
index info
{
type = plain
source = emacs_user_info
morphology = stem_en
path = /home/wvxvw/.emacs.d/sphinx/var/data/info
min_word_len = 1
preopen = 1
index_sp = 1
}
indexer
{
mem_limit = 1024M
}
searchd
{
# [hostname:]port[:protocol], or /unix/socket/path to listen on
# known protocols are 'sphinx' (SphinxAPI) and 'mysql41' (SphinxQL)
#
# multi-value, multiple listen points are allowed
# optional, defaults are 9312:sphinx and 9306:mysql41, as below
#
# listen = 127.0.0.1
# listen = 192.168.0.1:9312
# listen = 9312
# listen = /var/run/searchd.sock
listen = 127.0.0.1:9306:mysql41
log = /home/wvxvw/.emacs.d/sphinx/var/log/searchd.log
query_log = /home/wvxvw/.emacs.d/sphinx/var/log/query.log
pid_file = /home/wvxvw/.emacs.d/sphinx/var/log/searchd.pid
binlog_path = /home/wvxvw/.emacs.d/sphinx/var/log
}