Hi I configured sphinx search in my test server.
Now I am getting this kind of an error "Sphinx_Query failed: no enabled local indexes to search".
I am not getting why this error. Any body can help me plese.
This is my sphinx conf
source objectcollection
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = root
sql_db = mydatabase
sql_port = 3306
sql_query = \
SELECT id, id as mid obtype_id, searchtext from tab_objectcollection;
sql_attr_uint = mid
sql_attr_uint = obtype_id
sql_query_info = SELECT * FROM tab_objectcollection WHERE id=$id
}
index combinedobject
{
source = objectcollection
path = /usr/local/sphinx/var/data/objectcollection
morphology = stem_en
min_stemming_len = 4
stopwords = /usr/local/sphinx/var/data/stopwords.txt
min_word_len = 3
min_prefix_len = 3
min_infix_len = 0
enable_star = 1
phrase_boundary = ., ?, !, U+2026 # horizontal ellipsis
phrase_boundary_step = 100
html_strip = 1
}
indexer
{
# memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
# optional, default is 32M, max is 2047M, recommended is 256M to 1024M
mem_limit = 256M
# maximum xmlpipe2 field length, bytes
# optional, default is 2M
#
max_xmlpipe2_field = 16M
# write buffer size, bytes
# several (currently up to 4) buffers will be allocated
# write buffers are allocated in addition to mem_limit
# optional, default is 1M
#
#write_buffer = 16M
}
searchd
{
listen = 3312
max_matches = 10000
log = /usr/local/sphinx/var/log/searchd.log
query_log = /usr/local/sphinx/var/log/query.log
pid_file = /usr/local/sphinx/var/log/searchd.pid
}
Thanks
Have you
searchd
I think this error means that sphinx can't find the file(s) specified by "path" in your index. In my case I had:
path = /var/lib/sphinxsearch/data/delta
And I had ran the indexer
successfully (or so I thought) like this:
indexer delta --rotate
It said there were some documents collected. HOWEVER it actually created these files:
/var/lib/sphinxsearch/data/delta.new.sp?
And searchd
failed to rotate the files. Thus spake the log:
WARNING: rotating index 'delta': rename '/var/lib/sphinxsearch/data/delta.mvp' to '/var/lib/sphinxsearch/data/delta.old.mvp' failed: No such file or directory
The solution was: delete those new
files and run indexer
without --rotate
the first time.
The fact that --rotate
doesn't work the first time seems like a bit of a bug to me, but I can't really be bothered to submit a bug report. It probably requires me to register or some nonsense. Anyway, hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With