Elastic Search Primer

Source: Internet
Author: User
Tags file copy elastic search
  1. The first is to download Elasticsearch https://www.elastic.co/downloads, unzip;
  2. Then downloaded the Chinese parser Ik,github search Elasticsearch-ik can find, Https://github.com/medcl/elasticsearch-analysis-ik
  3. IK download down is an IK source code that needs to run maven to generate IK jar packages, different ES versions correspond to different jar packages, which are clearly stated on GitHub's homepage;
  4. Locate the bin in the directory after ES decompression, execute the command installation ik:plugin install File: Generated jar package
    1. An episode, the installation of IK after the start ES will error, said the IK configuration file can not be found, it is because IK will put the configuration file under Config, but ES will look under the plugins, the config under the file copy.
  5. Then install curl, which is a tool for sending HTTP requests, or you can enter URLs directly in the browser navigation bar, but for post requests you need special tools, and Chrome's plug-in sense can replace curl. Use curl on windows with caution, because DOS does not support single quotes, so you must use double quotes,
  6. With Curl and ES, you can use the following:
    1. The new index,index corresponds to the database,
    2. The new type, which is equivalent to table, allows you to specify the column definition of table when you build the table, via the mapping file
    3. Add document,curl-xput http://localhost:9200/index name/type name/1–D represents the JSON of the document
    4. Query, http://localhost:9200/goldsale0/stdq/_search?q= field name: Field value &pretty=true

Elastic Search Primer

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.