In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-10-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to carry out Elasticsearch retrieval and classification, the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
In Elasticsearch, when we have set up the Mapping (word splitter, field type), we can import the data in the set way.
Once we have the data, we need to retrieve the data.
0. Retrieve the overview
The behavior of the retrieval clause depends on whether the query is applied to a filter context or a query / analysis context.
Filtering context-corresponding to structured retrieval
1) the core answer is: "does this document meet the terms of this query?"
2) the answer is simple yes or no, the score is not calculated.
3) the filter context is mainly used to filter structured data. Similar to determining whether a field exists in Mysql:
For example:
Timestamp field: does it belong to 2015 or 2016?
Status field: is it set to published?
Frequently used filters will be cached automatically by Elasticsearch to speed up performance.
Analysis context-corresponding to full-text retrieval
1) the core answered, "does this document match this query clause?" It's a problem.
2) in addition to determining whether the document matches, the query clause calculates a _ score to indicate how well the document matches other documents.
The integrated application scenarios are as follows:
GET / _ search {"query": {"bool": {"must": [{"match": {"title": "Search"}, {"match": {"content": "Elasticsearch"}], "filter": [{"term": {"status": "published"} {"range": {"publish_date": {"gte": "2015-01-01"}
For the above search, title contains "Search" and content contains "Elasticsearch", status exactly matches "published", and the publish_date is greater than "2015-01-01".
Below, the retrieval classification is intuitively displayed in the form of "brain map".
Among them, 3-7 will be updated as I develop it in depth.
On how to carry out Elasticsearch retrieval classification to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.