zoukankan      html  css  js  c++  java
  • ElasticSearch-REST APIS

    接口语法

      点击官方API

    url -X<VERB> '<PROTOCOL>://<HOST>:<PORT>/<PATH>?<QUERY_STRING>' -d '<BODY>'

     使用示例

      index

    PUT /<index>

     You can use the create index API to add a new index to an Elasticsearch cluster. When creating an index, you can specify the following:

    • Settings for the index
    • Mappings for fields in the index
    • Index aliases

       mapping

    PUT /<target>/_mapping
    Adds new fields to an existing data stream or index. You can also use the put mapping API to change the search settings of existing fields.
    For data streams, these changes are applied to all backing indices by default.

       document

    PUT /<target>/_doc/<_id> POST /<target>/_doc/ PUT /<target>/_create/<_id> POST /<target>/_create/<_id>

    You cannot add new documents to a data stream using the PUT /<target>/_doc/<_id> request format. To specify a document ID, use the PUT /<target>/_create/<_id> format instead.

       search

    GET /<target>/_search
    GET /_search
    POST /<target>/_search
    POST /_search

    Allows you to execute a search query and get back search hits that match the query. You can provide search queries using the q query string parameter or request body.

  • 相关阅读:
    2018.7.9 模拟赛
    树状数组||归并排序求逆序对+离散化 nlogn
    LCS nlogn
    孤岛营救问题
    [POJ 3621] Sighting Cows
    树状数组求LIS
    nlogn求逆序对&&陌上花开
    最长可重区间集
    LCA模板
    [BZOJ] 4196 [Noi2015]软件包管理器
  • 原文地址:https://www.cnblogs.com/ryjJava/p/14289437.html
Copyright © 2011-2022 走看看