1

在 dse 6.7 上使用 cqlsh 查询时遇到问题。

Invalid Request: Error from server: code=2200 [Invalid query] message="Unsupported consistency level: LOCAL_QUORUM. Supported consistency levels for Search are: ONE, LOCAL_ONE".

我的查询很简单:

询问 :

select * from esc shipment . shipment search where shipper id like '1334';

我花了很多时间在谷歌上,但我没有找到任何与我的情况相同的用例。

谁能告诉我主要原因以及如何解决此问题。我是一个非常初学者。

4

1 回答 1

1

问题如下 - 您正在使用LIKE运算符在启用了 DSE 搜索的表上运行查询。因为 CQL 没有LIKE运算符,所以这个查询被卸载到 DSE 搜索,它只能以一致性级别ONELOCAL_ONE(正如它在错误中指出的那样 - 这是 DSE 搜索的一个已知限制)回答查询。

您需要使用 cqlsh 命令 CONSISTENCY 更改一致性级别,如下

CONSISTENCY LOCAL_ONE

然后再次执行查询。

于 2020-10-07T11:51:11.443 回答