Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Sphinxsearch无结果的数值查询_Php_Search Engine_Sphinx - Fatal编程技术网

Php Sphinxsearch无结果的数值查询

Php Sphinxsearch无结果的数值查询,php,search-engine,sphinx,Php,Search Engine,Sphinx,我有一个狮身人面像索引,它有大约500万条记录。。大多数是数字车牌,如E2 LNK、B1 SOB、A1 CAS等 当我搜索像“E2 LNK”这样的关键字时,E2的文档和点击次数总是为零,实际上所有字母数字查询返回的结果都为零 Im使用SPH_匹配_扩展模式 $this->sphinxclient->SetMatchMode(SPH_MATCH_EXTENDED); $this->sphinxclient->SetSortMode(SPH_SORT_EXTENDED, "@

我有一个狮身人面像索引,它有大约500万条记录。。大多数是数字车牌,如E2 LNK、B1 SOB、A1 CAS等

当我搜索像“E2 LNK”这样的关键字时,E2的文档和点击次数总是为零,实际上所有字母数字查询返回的结果都为零

Im使用SPH_匹配_扩展模式

$this->sphinxclient->SetMatchMode(SPH_MATCH_EXTENDED);
$this->sphinxclient->SetSortMode(SPH_SORT_EXTENDED, "@relevance DESC");
$res = $this->sphinxclient->Query('E2 LNK', $index_sphinx);
这是索引

source sphinx_index_numberplate
{

    type                                    = mysql
    sql_sock                                = /tmp/mysql.sock
    sql_host                                = localhost
    sql_user                                = user
    sql_pass                                = pass
    sql_db                                  = db
    sql_port                                = 3306

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

    sql_query                       =       SELECT id,id AS plate_id,number_first, number_second, number_third, plate_number, plate_number_full, LENGTH(plate_number) AS len, plate_type, is_available, price FROM plate \
                                           WHERE  id BETWEEN $start AND $end

            sql_attr_uint                                   =       plate_id
            sql_attr_uint                                   =       plate_type
            sql_attr_uint                                   =       price
            sql_attr_uint                                   =       len
            sql_attr_uint                                   =       is_available
}


index sphinx_index_numberplate
{
    source                  = sphinx_index_numberplate
    path                    = /usr/local/sphinx/data/sphinx_index_numberplate
    charset_type            = utf-8
    enable_star             = 1
}

尝试添加min\u word\u len=1

还可以通过在查询周围加引号来尝试精确匹配

这可能是斯芬克斯的一个问题,将您的输入作为两个不同的单词,每个单词的长度分别为2和3

您尝试过命令行搜索吗?结果如何