Appengine Search API vs Datastore

后端 未结 4 1963
慢半拍i
慢半拍i 2020-12-28 15:55

I am trying to decide whether I should use App-engine Search API or Datastore for an App-engine Connected Android Project. The only distinction that the google documentation

4条回答
  •  时光取名叫无心
    2020-12-28 16:31

    The most serious con of Search API is Eventual Consistency as stated here: https://developers.google.com/appengine/docs/java/search/#Java_Consistency

    It means that when you add or update a record with Search API, it may not reflect the change immediately. Imagine a case where a user upload a book or update his account setting, and nothing changes because the change hasn't gone to all servers yet.

    I think Search API is only good for one thing: Search. It basically acts as a search engine for your data in Datastore.

    So my advice is to keep the data in datastore that user expects immediate result, and use Search API to search the data that user won't expect immediate result.

提交回复
热议问题