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.

  • 相关阅读:
    EXCEL自动导出HTML
    亡灵序曲超清
    支持国产动画-唐伯卿和曾小兰
    中国表情
    logging 日志
    datetime库运用
    hashlib 加密
    os2
    python json数据处理
    python操作redis
  • 原文地址:https://www.cnblogs.com/ryjJava/p/14289437.html
Copyright © 2011-2022 走看看