1

I am building an Android(java) app that reads data from cloud firestore and displays said data in a list view. Currently I am planing on querying using GeoHash as a means to sort data. Since there is a lot of data to be retrieved from firebase I am looking for a way to reduce the amount of reads per average user (to reduce potential cost).

My idea is to store entire documents locally and ignore those documents from future queries for a limited period of time(a week or so). I am aware that there is no != ekvivalent in cloud firestore but i was wandering if there is a possibility to skip documents using their ids or something similar.

If there is no such a thing I was wondering what is the best way to accomplish similar effect. (using the classic >=5 and <= 7 approach to ignore 6 would be impossible since I need to hide several documents)

Yolonak
  • 13
  • 4

1 Answers1

0

Firestore does not support exclusions from queries. The only way to create an exclusion is by combining multiple range operations as you've already found. If that doesn't allow you to implement your use-case, Firestore may not be the best fit for it.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807