In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
[TOC]
Introduction to ElasticSearch
ElasticSearch is an open source search engine based on Apache Lucene, which is written in Java and uses Lucene to build indexes and provide search functions. The goal of ElasticSearch is to make full-text search simple, and developers can easily achieve search functions through its simple and clear RestFul API without having to face the complexity of Lucene. ES can easily carry out large-scale scale-out to support the processing of structured and unstructured massive data at PB level.
In a word: ElasticSearch is a real-time distributed search and analysis engine based on Lucene. ElasticSearch design is mainly used in cloud computing, can achieve real-time search, stable, reliable, fast, installation and use is also very convenient.
Official website: www.elastic.co
A short story about ElasticSearch: Shay Banon thought his participation in Lucene was completely accidental. When he was an unemployed engineer, he came to London with his new wife, who wanted to study as a cook in London, and he wanted to develop an app for his wife to search recipes, so he came to Lucene. Directly using Lucene to build search has a lot of problems, including a lot of repetitive work, so Shay continues to abstract on the basis of Lucene, making it easier for Java programs to embed search. After a period of polishing, his first open source work "Compass", which means "compass" in Chinese, was born. After that, Shay found a new job facing a high-performance distributed development environment. In his work, he gradually found that there was a growing need for an easy-to-use, high-performance, real-time, distributed search service, so he decided to rewrite Compass, turned it from a library into a separate server, and renamed it Elasticsearch. ES and Solr comparison interface similar to webservice interface REST-style access interface distributed storage solrCloud solr4.x supports es is a distributed support format solr xml json es json near real-time search ES and MySQL comparison MySQLElasticSearchdatabase (database) index (index library) table (table) row (row) document (document) field (field) introduction to REST (1): Overview
REST is called Representational State Transfer. It is an architectural style of software, not a standard, but provides a set of design principles and constraints. It is mainly used for client and server interaction class software. Software designed based on this style can be more concise, more hierarchical, and easier to implement caching and other mechanisms.
In fact, to put it bluntly, it is a visit similar to HTTP, which is very similar to HTTP.
REST operation:
GET: get the current state of the object; PUT: change the state of the object; POST: create the object; DELETE: delete the object; HEAD: get the header information. Introduction to REST (2): Rest specific operation description of the URI of a group of resources, such as: http://example.com/res/ the URI of a single resource, such as: http://example.com/res/123GET lists URI, and the details of each resource in the resource group (the latter is optional) to get the details of the specified resources The format can choose an appropriate network media type (such as XML, JSON, etc.) PUT replaces the current entire set of resources with a given set of resources to replace / create the specified resources. And append it to the appropriate resource group. POST creates / appends a new resource to this group of resources. This operation often returns a new URL that treats the specified resource as a resource group and creates / appends a new element under it to make it belong to the current resource. DELETE deletes the whole set of resources deletes the specified element REST introduction (3): ES built-in REST interface URL description / index/_search search data under the specified index / _ aliases get or manipulate the alias of the index / index/ view details of the specified index / index/type/ creation or operation type / index/_mapping creation or operation mapping/index/_setting creation or operation settings (number_of_shards is immutable) / index/_open Open specified closed index / index/_close close specified index / index/_refresh refresh index (make the new content visible to the search Do not guarantee that data is written to disk) / index/flush refresh index (will trigger Lucene submission) ElasticSearch installation configuration installation configuration Note: it can only be installed under ordinary users, not under root users. Unzip elasticsearch-2.3.0.zip-d.. / extract to the specified directory configuration config/elasticsearch.yml cluster.name: bigdata-08-28 node.name: hadoop path.data: / home/uplooking/data/elasticsearch path.logs: / home/uplooking/logs/elasticsearch network.host: uplooking01 Startup: $ELASTICSEARCH_HOME/bin/elasticsearch-d Verification: access to es's installation server The http://:9200 configuration file describes the logging.yml log configuration file. Es also uses log4j to log, so the settings in logging.yml can be set according to the normal log4j configuration. For the basic configuration file of elasticsearch.yml es, it is important to note that the format of key and value requires a space after ":". After modifying the following configuration, you can access the tcp port where Transport.tcp.port:9300 sets the interaction between nodes from another machine. The default is 9300.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.