Elasticsearch is a highly scalable open-source full-text search and analytics engine. It allows you to store, search, and analyze big volumes of data quickly and in near real time. It is generally used as the underlying engine/technology that powers applications that have complex search features and requirements.
Elasticsearch是一款高扩展性、开源的全文搜索及分析的引擎。它能够帮助你实时并快速地储存、搜索以及分析大量数据。它通常被作为底层引擎,为具有复杂搜索特性和需求的应用程序提供动力。
Here are a few sample use-cases that Elasticsearch could be used for:
下列是几例适用于Elasticsearch的使用案例:
You run an online web store where you allow your customers to search for products that you sell. In this case, you can use Elasticsearch to store your entire product catalog and inventory and provide search and autocomplete suggestions for them.
你经营一家网上商店,在那儿你的客人能搜索到你出售的商品。这个情况下,你能用Elasticsearch来储存记录整个产品目录、库存情况,并为其提供相关搜索及自动完成建议。
You want to collect log or transaction data and you want to analyze and mine this data to look for trends, statistics, summarizations, or anomalies. In this case, you can use Logstash (part of the Elasticsearch/Logstash/Kibana stack) to collect, aggregate, and parse your data, and then have Logstash feed this data into Elasticsearch. Once the data is in Elasticsearch, you can run searches and aggregations to mine any information that is of interest to you.
你想要收集日志或交易数据,并且分析和挖掘这些数据以查明趋势、数据统计、总结或异常情况。在这种情况下,可以使用Logstash(Elasticsearch / Logstash / Kibana stack的一部分)来收集,汇总和解析数据,然后使用Logstash将这些数据提供给Elasticsearch。一旦数据在Elasticsearch中,你便可利用搜索和整合来挖掘感兴趣的任何信息。
You run a price alerting platform which allows price-savvy customers to specify a rule like "I am interested in buying a specific electronic gadget and I want to be notified if the price of gadget falls below $X from any vendor within the next month". In this case you can scrape vendor prices, push them into Elasticsearch and use its reverse-search (Percolator) capability to match price movements against customer queries and eventually push the alerts out to the customer once matches are found.
你运行一个价格提醒平台,由精明的顾客指定规则,例如“我想购买一个特定的电子产品,我希望在下个月内只要产品价格低于$x 就收到通知,无论来自哪家供应商” 。在这种情况下,你可以压低供应商的价格,将它们纳入Elasticsearch,使用其反向搜索(Percolator)功能将价格变动与客户查询进行匹配,并在匹配成功后最终将提醒推送给客户。
You have analytics/business-intelligence needs and want to quickly investigate, analyze, visualize, and ask ad-hoc questions on a lot of data (think millions or billions of records). In this case, you can use Elasticsearch to store your data and then use Kibana (part of the Elasticsearch/Logstash/Kibana stack) to build custom dashboards that can visualize aspects of your data that are important to you. Additionally, you can use the Elasticsearch aggregations functionality to perform complex business intelligence queries against your data.
您有分析/业务智能的需求,并希望快速调查、分析、可视化并针对大量数据提出特别的问题(想想几百万或几十亿条记录)。在这种情况下,您可以使用Elasticsearch存储数据,然后使用Kibana(Elasticsearch / Logstash / Kibana堆栈的一部分)来构建自定义仪表板,以便将那些对你来说很重要的数据进行可视化。另外,您可以使用Elasticsearch整合功能对数据执行复杂的商业智能查询。
For the rest of this tutorial, you will be guided through the process of getting Elasticsearch up and running, taking a peek inside it, and performing basic operations like indexing, searching, and modifying your data. At the end of this tutorial, you should have a good idea of what Elasticsearch is, how it works, and hopefully be inspired to see how you can use it to either build sophisticated search applications or to mine intelligence from your data.
在本教程的其余部分,你将学习如何启动并运行Elasticsearch,浏览并执行诸如索引,搜索和修改数据的基本操作。在本教程结束时,您应该对Elasticsearch的概念以及它的工作原理有一个很好的了解,并希望能够在关于如何使用它构建复杂的搜索应用程序或从数据中挖掘情报这些方面对你有所启发。