masumsoft / express-cassandra

Cassandra ORM/ODM/OGM for NodeJS with support for Apache Cassandra, ScyllaDB, Datastax Enterprise, Elassandra & JanusGraph.
http://express-cassandra.readthedocs.io
GNU Lesser General Public License v3.0
227 stars 67 forks source link

$in query in partitioning key showing error. #208

Closed rakibulalam closed 4 years ago

rakibulalam commented 4 years ago

following db index.

key: [ [ 'app_id', 'country_id' ], 'id' ],
    indexes:['id'],
    clustering_order: { id: 'desc' },

this the query not working on basis of express cassandra. But its working cqlsh as well.

{ query: 'SELECT  * FROM "app_currencies" WHERE "app_id" = ? AND "country_id" IN ?     LIMIT 10;',
  params: 
   [ TimeUuid: be266340-0ebf-11e9-ba31-e5aaa89f0f91,
     [ TimeUuid: de9ff520-7f10-11e9-ba1b-3fbaa6b20e18,
       TimeUuid: e4ab59f0-7f10-11e9-ba1b-3fbaa6b20e18,
       TimeUuid: eaa61cf0-7f10-11e9-ba1b-3fbaa6b20e18 ] ] }

showing the following error message. which is really unexceptable.

apollo.model.find.dberror: Error during find query on DB -> ResponseError: Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING

rakibulalam commented 4 years ago

got it the mistake. thank you.