Reactjs 我可以使用firestore中的where键而不匹配字符串吗

Reactjs 我可以使用firestore中的where键而不匹配字符串吗,reactjs,firebase,google-cloud-firestore,Reactjs,Firebase,Google Cloud Firestore,我在firebase中有一些文档,如: {name:'hasaduzzaman'} {name:'himel'} 我的firebase查询如下: const [searchtext,setSearchText] = useState('') let collectionRef = firestore.collection('users'); collectionRef.where('name', '==', searchText) // This is comming from the sta

我在firebase中有一些文档,如:

{name:'hasaduzzaman'}
{name:'himel'}
我的firebase查询如下:

const [searchtext,setSearchText] = useState('')
let collectionRef = firestore.collection('users');
collectionRef.where('name', '==', searchText) // This is comming from the state of react hooks


我的主要观点是,如果searchText与用户的全名不匹配,则不会返回任何内容。是否有任何方法可以在不匹配用户全名的情况下使用where键

如果是firebase,则不可用。我也有类似的担忧,但通过使用标记创建了一个变通方法。在你的情况下,我想你可以使用algolia服务

甚至他们也有一份关于同一问题的官方文件


Firestore无法执行全文搜索。它可以进行所谓的前缀搜索,返回名称以*某个子字符串开头的文档,方法是:
collectionRef.where('name',“>=”,“him”)。where('name',”