firebase创建数据库
One of the most important parts of building any website or web app is its search functionality. Search functionality helps to make interactions with products easier and faster. We live in a world where every millisecond counts and a bad search experience could lead to users discontinuing the use of a product.
建立任何网站或网络应用程序最重要的部分之一就是其搜索功能。 搜索功能有助于简化与产品的交互。 我们生活在一个毫秒级的世界中,糟糕的搜索体验可能会导致用户停止使用产品。
什么是即时搜索? (What is Instant Search?)
It’s a predictive search feature that tries to anticipate and guess the most likely completion of what a user’s search query is and displays information that is relevant to the user’s input instantly with every keystroke inputted in the search box.
它是一种预测性搜索功能,可尝试预测和猜测用户搜索查询的最可能完成情况,并通过在搜索框中输入每次击键立即显示与用户输入有关的信息。
先决条件: (Prerequisites:)
You must know the basics of Android, Firestore, and Kotlin.
您必须了解Android,Firestore和Kotlin的基础知识。
我们要实现什么: (What are we going to implement:)
![Image for post](https://img-blog.csdnimg.cn/img_convert/e22d0a75622db7ca6b5e4f1495210c69.png)
入门: (Getting Started:)
The most important part of the Firestore is to define the database structure. So that we can query each keyword and match it with our actual display result.
Firestore最重要的部分是定义数据库结构。 这样我们就可以查询每个关键字并将其与我们的实际显示结果进行匹配。
![Image for post](https://miro.medium.com/max/9999/1*Q3nZ8ZF9I0T4YPgHv9KR2g.png)