I have configured RestHeart to get data from MongoDB. Requests that involve String, Object, Number work well and return the same results than if I use a client to query the MongoDB (RoboMongo, MongoDB Compass...). However requests that involved Date data type take longer than with MongoDB clients and Nginx closes the connection after 60s (the same query with a client takes 0.163s)
## Query in a MongoDB client
db.getCollection('collection').find({"DATE_A_FMT": {'$gte':ISODate('2017-02-21T05:00:00.000Z')}})
## Request with RestHeart
https://IP/DB/collection/?filter={'DATE_A_FMT': {'$gte':{'$date':'2017-02-20T05:00:00.000Z'}}}
The collection has an index for DATE_A_FMT field that is used when the query is executed with a client. In addition, I have tried to add sorting but I have the same result.
The configuration of RestHeart is the same as the default configuration in the documentation with the difference of the connection to MongoDB. In this case I use a cluster with 3 instances (1 Master and 2 slaves). Furthermore the RestHeart log file shows all the request that are executed except these requests so I can't see what happen with them.
Any suggestion in order to discover what and where is the issue with this queries? Thanks in advance.