Riak 中的多个查询

Multiple queries in Riak

我正在通过 HTTP API 查询我的 Riak 数据库,如下所示:

/select?q=+build:2702168+hypervisors:500&q.op=and&wt=json&sort=tstart_int%20desc"

但是除第一个参数之外的所有其他查询参数都将被忽略。所以在这种情况下,它 returns 所有满足 build:2702168 的条目,但忽略 hypervisors:500.

This piece of documentation,虽然很旧,但表明您可以进行常规的 solr 多查询:

The following example return documents containing the words “red” and “blue” but not “yellow”.

red AND blue AND NOT yellow 

The required ( + ) operator can be used in place of “AND”, and the prohibited ( - ) operator can be used in place of “AND NOT”. For example, the query above can be rewritten as:

+red +blue -yellow

但是,我在最新的 Riak 文档中找不到相同的信息。还有其他方法吗?

这似乎是一个很老的错误。 According to Basho's Ryan Zezeski:

At one time I fixed it but it had to be reverted because it broke rolling upgrade 1. It has languished ever since. To work around explicitly put AND in the query. E.g. q=nickname:Ring%20AND%20breed:Shepherd

正如他所说,改为这样做:

/select?q=build:2702168%20AND%20hypervisors:500&wt=json&sort=tstart_int%20desc

已解决问题。