Sphinx 获取代理模式

Sphinx get agent schema

这是我的第一个问题,请原谅我的错误:)。 作为我使用 Yii2 的框架,在任何请求的开始,我都遇到了通过命令在 sphinx 中接收分布式索引代理的答案的问题:

DESCRIBE `10.0.0.22:9312:indexName`;

我得到:

ERROR 1064 (42000): sphinxql: syntax error, unexpected $undefined, expecting IDENT (or 49 other tokens) near '`10.0.0.22:9312:indexName`'

我的分布式会议:

index indexName {
    type = distributed
    agent = 10.0.13.24:9312|10.0.0.22:9312:indexName
    ha_strategy = noerrors
}

其他会议:

index indexName
{
    type            = rt

    path            = /var/lib/sphinxsearch/data/indexName

    rt_field        = code
    rt_field        = title
    rt_field        = article
    rt_field        = docket

    rt_attr_uint        = code
    rt_attr_string      = title
    rt_attr_string      = article
    rt_attr_string      = docket

    morphology = lemmatize_ru, stem_enru
    charset_table   = 0..9, U+410..U+42F->U+430..U+44F, U+430..U+44F, _
    blend_chars     = +, &, @
    dict        = keywords
    min_word_len    = 1
    min_prefix_len  = 1
}

我的 searchd conf 是默认的。

此外,我还有一个查询问题,其中字段名称带有反引号,例如:

SELECT `id`, weight() as relevance from indexName where match('asus');

我得到:

ERROR 1064 (42000): index indexName: agent 10.0.0.22:9312: remote error: select: syntax error, unexpected '`', expecting $end near '`, weight() as relevance'

我也在控制台中尝试了这个查询,但出现了同样的错误。但是,如果我进行简单的查询,如 "SELECT * FROM indexName WHERE MATCH('asus')",一切正常。

唉,尽管 'DESCRIBE' 请求,但 sphinx 肯定不能 'proxy'。您只能描述本地索引和分布式索引本身(以获取其组件)。

无法获取远程索引的 feilds/attributes,客户端必须直接连接到远程代理才能获取设置。 (虽然当然至少可以得到一个属性列表,通过运行一个查询(SELECT * FROM dist LIMIT 1)


至于引号的问题,这是一个已知的错误,但不知道修复它的状态如何。 运行 没有反引号的查询通常效果更好。