QueryFilter无法在DynamoDB中运行

时间:2014-05-29 19:12:03

标签: php amazon-dynamodb

我正在尝试查询DynamoDB中表'通知'表的所有排队通知。

Global Secondary Indexes: Name: idTo-time-index
Hash Key: idTo (Number)
Range Key: time (Number)

为什么我收到所有结果,而不仅仅是status=='queued'

$params = array(
    'TableName' => 'notifications',
    'IndexName' => 'idTo-time-index',
    'KeyConditions' => array(
        "idTo" => array(
            "AttributeValueList" => array(
                array('N' => 1)
            ),
            "ComparisonOperator" => "EQ"
        )
    ),
    'ScanIndexForward' => false,
    'QueryFilter' => array(
        "status" => array(
            "AttributeValueList" => array(
                array('S' => (string)"queued")
            ),
            "ComparisonOperator" => "EQ"
        )
    ),
);

$response = $dynoClient->query($params);

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,我通过更新ASW SDK解决了这个问题,原因是最近添加了查询过滤器,在我执行相同查询的旧SDK中,然后查询过滤器无效。

Updating the SDK should solve your problem

希望有所帮助