Availability date range queries in app engine datastore?

不打扰是莪最后的温柔 提交于 2019-12-02 13:08:48

If you have a relatively small number of entities (not in millions), you can run two keys-only queries - one for start date and one for end date, and then find the intersection of results. Keys-only queries are almost free and very fast.

If there are some other limitations on your data, you can use them to optimize this process. For example, if the availability range has a duration limit, you can loop through the start-date query until you reach a date at which an entity can no longer be available, because the start date is too far away from the desired end date. Then do the same with the end date query.

Use the search api as you suggest. I had the same problem of multiple inequalities and slso used search api to solve it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!