Answer the question
In order to leave comments, you need to log in
Not working in php sphinx what to do?
source mainConfSourse
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass =
sql_db = test
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
}
# 2
source testDoc2Src : mainConfSourse
{
sql_query = SELECT id, user.name AS name \
FROM user;
#type of group fields
sql_field_string = name
}
index testDoc2Index
{
source = testDoc2Src
path = C:/Sphinx/data/testDoc2/testDoc2
morphology = stem_enru, Soundex, Metaphone
min_word_len = 1
expand_keywords = 1
index_exact_words = 1
min_infix_len = 3
# dict = keywords
# mlock = 0
# docinfo = extern
# min_stemming_len = 1
# wordforms = C:/Sphinx/data/wordforms.txt
# ngram_chars = U+3000..U+2FA1F
# phrase_boundary = ., ?, !, U+2026 # horizontal ellipsis
}
##########################################################################################################################
indexer
{
mem_limit = 64M
}
searchd
{
listen = 127.0.0.1:9306:mysql41
pid_file = C:/Sphinx/log/searchd.pid
log = C:/Sphinx/log/searchd.log
query_log = C:/Sphinx/log/query.log
#binlog_path = c:/sphinx/data/binlog/
mysql_version_string = 5.0.0
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
}
include 'sphinx/sphinx.php';
$s = new SphinxClient;
$s->setServer("localhost", 9306);
$s->setMatchMode(SPH_MATCH_ANY);
$s->setMaxQueryTime(3);
$result = $s->query("www");
var_dump($result);
Answer the question
In order to leave comments, you need to log in
listen = 127.0.0.1:9306:mysql41
here can not, mysql at the end is a connection through mysqli, to work through the client there must be another listen, without mysql at the end. You can specify two listens with different ports
Muscle port you connect with a naive client, if you use a muscle port then connect with a muscle driver
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question