amazon web services - Dynamodb query - OR condition in KeyConditionExpression -


i have dynamodb table "feed_guid" global secondary index. want query set of feed_guid in table. since "feed_guid" not primary keys, cant use getbatchitem. when tried following method, got error "invalid operator used in keyconditionexpression: or".

$options = array(             'tablename' => 'feed',                 'indexname' => 'guidindex',                 'keyconditionexpression' => 'feed_guid = :v_guid1 or feed_guid = :v_guid2',                  'expressionattributevalues' =>  array (                     ':v_guid1' => array('s' => '8a8106e48bdbe81bf88d611f4b2104b5'),                     ':v_guid2' => array('s' => '19cab76242a6d85717de64fe4f8acbd4')                 ),                 'select' => 'all_attributes',             );             $response = $dynamodbclient->query($options); 

you can't use or condition. should use rangeattributename between :rangeval1 , :rangeval2 if possible or feed_guid in (:v_guid1, :v_guid2).

see expressionattributevalues , keyconditionexpression


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -