<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ## 概述 **search_type 表示搜索類型** - matchall 返回索引的所有文檔。不受 `query`的限制 - match 匹配查詢可以選擇執行模糊匹配。如果模糊度參數被設置為非零整數,則所分析的文本將與指定的模糊度相匹配。 此外,prefix_length參數可用于要求字詞也具有指定長度的相同前綴。 - matchphrase 匹配短語查詢類似于短語查詢,但它會分析輸入文本,并使用分析結果生成短語查詢。 - term 對單詞的精度匹配 - querystring 查詢語言查詢允許人類使用簡單的語法來描述復雜的查詢。 - prefix - wildcard - fuzzy 模糊匹配 - daterange **_source 返回字段** 如果為空則返回全部,填相關字符串組則表示返回指定字段` "Field1", "Field2" ` **query 表示查詢條件** - term - field - start_time 開始時間 - end_time 結束時間 ## 基礎搜索 格式 ``` POST /api/:target/_search ``` 示例 ``` POST http://localhost:4080/api/hello2/_search ``` 請求體 ``` { "search_type": "match", "query": { "term": "Prabhat", "field": "_all", "start_time": "2021-12-25T15:08:48.777Z" }, "sort_fields": ["-@timestamp"], "from": 0, "max_results": 20, "_source": [ ] } ``` _source ## 聚合查詢 ``` POST http://localhost:4080/api/olympics/_search ``` 請求體 ``` { "search_type": "match", "query": { "term": "Ice Hockey" }, "sort_fields": ["-@timestamp"], "from": 0, "max_results": 20, "aggs": { "Medal": { "agg_type": "term", "field": "Medal", "size": 10 }, "Year": { "agg_type": "range", "field": "Year", "size": 10, "ranges": [ {"from": 1900, "to": 1920}, {"from": 1921, "to": 1950}, {"from": 1951, "to": 2000}, {"from": 2000, "to": 2021} ] }, "@timestamp": { "agg_type": "date_range", "field": "@timestamp", "size": 10, "date_ranges": [ { "from": "2020-01-21T09:22:50.604Z", "to": "2021-01-21T09:22:50.604Z" }, { "from": "2021-01-22T09:22:50.604Z", "to": "2023-01-21T09:22:50.604Z" } ] }, "max_Year": { "agg_type": "max", "field": "Year" }, "min_Year": { "agg_type": "min", "field": "Year" }, "avg_Year": { "agg_type": "avg", "field": "Year" }, "weighted_avg_Year": { "agg_type": "weighted_avg", "field": "Year", "weight_field": "Year" }, "sum_Year": { "agg_type": "sum", "field": "Year" }, "count_Sport": { "agg_type": "count", "field": "Sport" } } } ``` 請求 返回 ``` { "took": 250, "timed_out": false, "hits": { "total": { "value": 3051 }, "max_score": 17.82873837347811, "hits": null }, "aggregations": { "@timestamp": { "buckets": [ { "key": "[2020-01-21T09:22:50Z,2021-01-21T09:22:50Z)", "doc_count": 0 }, { "key": "[2021-01-22T09:22:50Z,2023-01-21T09:22:50Z)", "doc_count": 6102 } ] }, "Medal": { "buckets": [ { "key": "gold", "doc_count": 1026 }, { "key": "silver", "doc_count": 1024 }, { "key": "bronze", "doc_count": 1001 } ] }, "Year": { "buckets": [ { "key": "[1900.000000,1920.000000)", "doc_count": 132 }, { "key": "[1921.000000,1950.000000)", "doc_count": 2292 }, { "key": "[1951.000000,2000.000000)", "doc_count": 9822 }, { "key": "[2000.000000,2021.000000)", "doc_count": 5646 } ] }, "avg_Year": { "value": 1980.4818092428711 }, "count_Sport": { "value": 3051 }, "max_Year": { "value": 2014 }, "min_Year": { "value": 1908 }, "sum_Year": { "value": 36254700 }, "weighted_avg_Year": { "value": 1980.4818092428711 } }, "error": "" } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看