Firestore - How to apply 'string contains' condition on a field while querying?

巧了我就是萌 提交于 2021-01-29 10:24:40

问题


Collection - Post
{
  "postId" : "post_124",
  "title" : "World population 2020"
}                                                                                       

How to write a query that returns posts having the string "World population" in the "title" field?


回答1:


Firestore doesn't support this level of query. See Full-text search for a possible work-around/solution. The only expressions available are:

<, <=, ==, >, >=, array-contains, in, or array-contains-any.



来源:https://stackoverflow.com/questions/58760663/firestore-how-to-apply-string-contains-condition-on-a-field-while-querying

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