Some concepts in the Elasticsearch

Source: Internet
Author: User

Index Word (term)

The index Word (term ) in Elasticsearch is an exact value that can be indexed. Foo,foo Foo Several words are not the same index words. Index Words (term) is an accurate search through term queries.

literal (text)

Text is an ordinary unstructured text, usually, the text will be analyzed by the index Word, stored in the Elasticsearch Index Library, in order to allow the text to search, the text field needs to be analyzed beforehand, when the keyword in the text query, The search engine should search for the original text according to the searching criteria.

     analysis

     analysis is the process of converting text to indexed words, and the results of the analysis depend on the word breaker, For example:  foo bar, Foo-bar, FOO bar These words are likely to be parsed into the same index terms FOO and BAR, which are stored in elasticsearch in the index library. When using  foo:bar for full-text search, search engines can also search the index library for previous content based on matching calculations. This is the search analysis of elasticsearch.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/7A/B2/wKioL1awuIGwOfOXAAAwY15mUg0691.png "title=" Es1.png "alt=" Wkiol1awuigwofoxaaawy15mug0691.png "/>650" this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/ 7a/b2/wkiol1awujlrbqsdaaawy15mug0234.png "title=" Es1.png "alt=" Wkiol1awujlrbqsdaaawy15mug0234.png "/>

cluster (cluster)

A cluster consists of one or more nodes that share the same cluster name. Each cluster has a separate master node, which is automatically selected by the program, and if the current primary node fails, the program automatically chooses the other node as the primary node.

nodes (node)

A node belongs to a cluster. Typically, a server has one node, but sometimes a server can have multiple nodes for ease of testing. At startup, a node will use the broadcast to discover an existing cluster with the same cluster name and attempt to join the cluster.

Routing (routing)

When a document is stored, it is stored in a unique primary shard, which is selected by the hash value. By default, this value is generated by the document's ID. If the document has a specified parent document, generated from the parent document ID, the value can be modified when the document is stored.

Shard (Shard)

A shard is a single instance of Lucene. This is a relatively low-level feature managed by Elasticsearch. An index is a logical space that points to a primary shard and a replica shard. For use, you only need to specify the number of shards, others do not have to do too much. In the process of development use, our corresponding objects are indexes, Elasticsearch will automatically manage all the shards in the cluster, when a failure occurs, a elasticsearch will move the shards to different nodes or add new nodes.

Primary Shard (Primary shard)

Each document is stored in a shard, and when you store a document, the system is first stored in the primary shard and then copied to a different copy. By default, an index has 5 primary shards. You can set the number of shards in advance, and when shards are established, the number of shards cannot be modified.

Replica shard (Replica shard)

There are 0 or more copies of each shard. The replica is primarily a copy of the primary Shard, which has two purposes:

1. Increased high availability: when the primary shard fails, you can select one from the replica shard as the primary shard.

2, improve performance: When the query can be in the main shard or replica shard query. By default, one primary assignment has one copy, but the number of replicas can be increased in the later dynamic configuration. Replicas must be deployed on different nodes and cannot be deployed on the same node as the primary shard.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7A/B3/wKiom1awuCWwmuxwAAAtd02WpPI312.png "title=" Es2.png "alt=" Wkiom1awucwwmuxwaaatd02wppi312.png "/>

Indexing (Index)

The index is like a database in a relational database, each index has a different field, can correspond to different types, each index can have one or more primary index slices, and each index can also have 0 or more copies of the index slice.

Types (Type)

Types are similar to tables in relational databases. Each type can specify a different column. The map defines the type of each field in the document and can specify how to parse it.

Documents (document)

     a document is a JSON-formatted string stored in the Elasticsearch. It is like a row in a table in a relational database. Each file stored in the index has a type and an ID, each of which is a JSON object that stores 0 or more fields, or key-value pairs. The original JSON document is stored in a field called _source. When searching for document when This field is returned by default .

    Mapping(mapping)

Mapping a table structure like a relational database, each index has a mapping that defines each of the field types in the index, as well as the settings within an index range. A map can be defined in advance or automatically recognized the first time the document is stored.

Fields (field)

A document contains 0 or more fields, which can be a simple value (such as a string, an integer, a date), or a nested structure of an array or an object. field is similar to a column in a table in a relational database. Each field corresponds to a field type, such as an integer, a string, an object, and so on. The field can also specify how the value of the field is parsed.

Source fields (source field)

By default, your original document will be stored in the _source field, which is returned when you query. This allows you to access the original object from the search results , which returns an exact JSON string that does not display any other data after the index analysis.

Primary KEY (ID)

The ID is a unique identifier for a file, and if no ID is provided at the time of the repository, an ID is automatically generated and the document's index/type/id must be unique.

Secisland Follow-up will gradually Elasticsearch The latest version of the features of the analysis, near please look forward to.

Some concepts in the Elasticsearch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.