First glance at ElasticSearch, elasticsearch

Source: Internet
Author: User

First glance at ElasticSearch, elasticsearch
First glance at the ElasticSearch official website, I don't know what to talk about .. There is a start with on youtube. The content is to run the elastic search under windows, and then use a fidler tool for visual testing.

Https://www.youtube.com/watch? V = 60UsHHsKyN4

In a rough view, elasticsearch is no different from other databases, but it has many powerful functions. Therefore, elasticsearch is suitable for projects that need to be searched. It seems that you can use curl to send data in JSON format (actually a command) to es for CRUD.Elasticsearch's authoritative guide, a book, may be helpful and is being translated on gitbook. The download shows that the translation is actually quite good. Although the English version is original, it is much faster to read Chinese .. Download and call learnelasticsearch.pdf

Http://es.xiaoleilu.com

A simple introduction to es, Chinese looks faster

Http://www.elasticsearch.cn

It's a pity that it's gradle ..

Http://java.dzone.com/articles/first-step-spring-boot-and

This document is from spring io and briefly introduces how to directly apply elastic search to springboot.

Http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-nosql.html

It took me a night to read a lot of materials to understand what this thing is .. Blunt qualifications... In essence, elasticsearch does not differ significantly from NoSql databases such as Mongodb. It is estimated that the biggest advantage is fuzzy search and range search. Therefore, the name of elasticsearch emphasizes search. At first, I thought this was the algorithm library used for searching, and the result was still a database .. I hope my understanding is superficial, and I hope it will be far more powerful than that... Learnelasticsearchpipeline, You can initially learn some basic knowledge of ES in the command line, in fact, the database CRUD and so on, and more advanced is the ES search function (Focus ).

C:
Curl-XPUT localhost: 9200/Export Corp/employee/1-d '{"name": "charlie "}'

R:
Curl-XGET localhost: 9200/Export Corp/employee/1

U:
Curl-XPOST localhost: 9200/Export Corp/employee/1-d '{"last_name": "peng "}'

D:
Curl-DELETE localhost: 9200/Export Corp/employee/1

After the basic CRUD, ElasticSearch provides powerful search functions.
When searching, A json data is actually sent to a url, and the json data packet contains the search criteria.
Curl-XGET localhost: 9200/magacorp/employee/_ search? Pretty-d '{"query": {"match": {"last_name": "huang "}}}'

Here, the json name DSL is the so-called Domain Specific Language.

The more complex DSL is as follows,
{
"Query ":{
"Filtered ":{
"Filter ":{
"Range ":{
"Age": {"gt": 30}
}
},
"Query ":{
"Match ":{
"Last_name": "Smith"
}
}
}
}

Full-text search:
{
"Query ":{
"Match": {"last_name": "John Smith "}
}
}
This will give feedback in order based on search scores

{
"Query ":{
"Match_phrase": {"last_name": "John Smith "}
}
}
This will precisely search the phrase

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.