Abstract:The concept of search is deeply rooted in the hearts of the people, but it is not easy to make a search service with excellent experience.
This article is shared from Huawei cloud community “Application of cloud search service in app search scenario”Master he who writes code
Search is everywhere, especially in today’s mobile Internet. Search has played an important role in social networking, e-commerce, video and other apps. As the entrance of information, search can help users find the information they want from the mass of information. Typical scenarios of APP search are as follows:
- Find users:The search results are sorted according to the user attributes;
- Search topic:Matching topics according to user input and ranking search results according to topic attributes;
- Search post:The search results are sorted according to the content attributes;
- Search or recommend by geographic location:According to the user’s input address information, it is converted into latitude and longitude, and the address information in the topic and content is matched within a certain distance, and the search results are sorted according to their properties.
In fact, although the concept of search is deeply rooted in the hearts of the people, it is not easy to make a search service with excellent experience. In terms of performance and search accuracy, there are some difficulties that can not be ignored, and these are often the key to improve the search experience. Customer difficulties are as follows:
● Database based performance issues:
Data are generally stored in MySQL database by database and table, and there are association operations in search, so the query efficiency is very low;
The query performance of the database is difficult to achieve millisecond level, and the user search experience is very poor.
●Database based matching problem:
In the database, it is impossible to sort the attributes after considering the query conditions;
Some special characters cannot be filtered in the database. If there are special characters in the user’s nickname during the search process, it will be inaccurate.
● Problems based on the open source search engine elasticsearch:
The default BM25 correlation ranking cannot ensure the rationality of search results;
The simple word segmentation does not handle special characters properly.
For example: when searching for the user “sea”, why is the big V user “kkw star sea” behind “looking for that sea”?
For customers who want to build app search, from the technical level, the implementation scheme is as follows.Huawei cloud search serviceBased on elastic search, it can complete TB level retrieval task in milliseconds and return results, which can solve the performance problem of traditional database.
Overall implementation scheme
In the cloud search service, we have made the following optimization for the search pain points of customers to help customers enhance user experience, improve efficiency and achieve rapid business growth.
HuaweiCloud search serviceOptimization of the search scheme in this paper
● supportCustom Dictionary In order to improve the matching accuracy of search input, users add hot search words, keywords and network common words to the thesaurus;
● supportCustom weightThe user can define the weight of different query conditions according to the business to determine the ranking of the final results;
● supportMore search, more accurate(Planning), the cloud search service automatically updates the attribute weight according to the click behavior of the search results, so as to achieve a more accurate ranking of the final results.
In the cloud search service, we provide additional solutions on word segmentation and thesaurus to help customers solve problems such as search accuracy.
Cloud search service word segmentation, thesaurus scheme:
Due to the different meanings of user nickname, content and topic expression, different word participators can be used for different fields to improve the matching accuracy. The specific functions are shown in the table below:
It can also support all searchable fields to process traditional Chinese characters;
For hot search words, key words and common words on the Internet, they often change with time. Therefore, we update the user-defined thesaurus to improve the search accuracy.
In general,Cloud search serviceThe search scenario of Internet app has the following advantages:
● One click operation, worry free operation and maintenance
All the main operations are accessible with one click, and the professional team can operate and maintain them close to each other to quickly build the search function module;
Application on demand, online expansion, easy to meet the needs of business growth;
● Flexible thesaurus management
Support user-defined thesaurus and Pinyin segmentation, support thesaurus hot update, no need to restart, configuration takes effect, no impact on end users;
● Flexible word segmentation, flexible weight
Different fields use different word segmentation methods to improve the search accuracy. Different conditions set different weights to improve the search accuracy;
● Efficient real time retrieval
The results of millisecond level retrieval are returned, and the new data can be retrieved immediately after being put into the database, providing a good user experience.
Big data inclusive innovation package is 75 years old. MapReduce, data warehouse, cloud search, data Lake exploration, data visualization and data Lake Governance Center help enterprises release the data value of thousands of industries! If you participate in the activity, you can get the red envelope after you register! More opportunities to participate in the lucky draw to win a good gift!