search.conf 文件:
source app_main
{
type = pgsql
sql_host = localhost
sql_user = blizzard_moz455_1_3
sql_pass = adminpwd
sql_db = blizzard_moz455_1_3
sql_port = 5432
sql_query = \
SELECT "id", "header", "date", "is_paid", "text", 10 as content_type\
FROM app_main
sql_query_info = SELECT * FROM "app_main" WHERE "id" = $id
sql_attr_uint = content_type
sql_attr_timestamp = date
}
index app_main
{
source = app_main
path = D:/blizzard/Projects/Python/Web/moz455/app/sphinx
docinfo = extern
morphology = stem_enru
min_word_len = 2
charset_type = utf-8
html_strip = 1
html_remove_elements = script
min_prefix_len = 0
min_infix_len = 3
enable_star = 1
}
indexer
{
mem_limit = 32M
}
searchd
{
listen = 127.0.0.1:3312
log = searchd.log
query_log = query.log
read_timeout = 5
max_children = 30
pid_file = searchd.pid
max_matches = 1000
}
命令“indexer --config sphinx.conf --all”的输出:
using config file 'sphinx.conf'...
indexing index 'app_main'...
collected 1 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 1 docs, 143 bytes
total 0.065 sec, 2172 bytes/sec, 15.19 docs/sec
total 2 reads, 0.000 sec, 2.5 kb/call avg, 0.0 msec/call avg
total 9 writes, 0.000 sec, 1.2 kb/call avg, 0.0 msec/call avg
即没有错误。但是没有创建索引文件。