amazon-web-servicesamazon-cloudsearch

how can we get total number of items in cloudsearch?


I am working on customer document (data like fname, lname, orderAmount etc.) which is configured on AWS CloudSearch. Now the situation is that I am showing this data on jquery datatable. for pagination I required to have total items available for search. Is there any way I can get count of all available document on cloudsearch ?

I am getting response for matching count, But not the total items available on cloudsearch doamin.

I have search for this under https://docs.aws.amazon.com/cloudsearch/latest/developerguide/what-is-cloudsearch.html but did not found any useful thing.

Any trick to get total document count on particular cloudsearch domain ?


Solution

  • amazon does not have an easy way to fetch all the records, so we basically pass a condition which would never be true & return all the record.

    Key Points

    For Example

    http://search-movies-rr2f34ofg56xneuemujamut52i.us-east-1.cloudsearch.amazonaws.com/2013-01-01/search?q=(and+(id:0))&q.parser=structured&return=_no_fields&size=1