<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # Nested Query(嵌套查詢) Nested query allows to query nested objects / docs (see?[nested mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html "Nested datatype")). The query is executed against the nested objects / docs as if they were indexed as separate docs (they are, internally) and resulting in the root parent doc (or parent nested mapping). Here is a sample mapping we will work with: 嵌套查詢允許查詢被嵌套的對象/文檔(參考[nested mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/nested.html "Nested datatype"))。查詢是在被索引分隔開的文檔/嵌套的對象(內部)執行的,返回的結果是根文檔(或者父嵌套映射)。這里是我們將用到的映射示例: | `curl -XPUT?``'localhost:9200/my_index?pretty'`?`-d'` `{` `"mappings"``: {` `"type1"`?`: {` `"properties"`?`: {` `"obj1"`?`: {` `"type"`?`:?``"nested"` `}` `}` `}` `}` `}'` | 這里是嵌套查詢用法的示例: | `curl -XGET?``'localhost:9200/_search?pretty'`?`-d'` `{` `"query"``: {` `"nested"`?`: {` `"path"`?`:?``"obj1"``,` `"score_mode"`?`:?``"avg"``,` `"query"`?`: {` `"bool"`?`: {` `"must"`?`: [` `{?``"match"`?`: {``"obj1.name"`?`:?``"blue"``} },` `{?``"range"`?`: {``"obj1.count"`?`: {``"gt"`?`:?``5``}} }` `]` `}` `}` `}` `}` `}'` | 查詢的路徑指向了被嵌套的對象路徑,查詢包括查詢將運行在匹配上的嵌套的文檔和連接跟文檔的直接路徑上。注意任何在查詢內部引用的字段必須使用全路徑。 score_mode允許我們設置可以內部子嵌套對匹配到的父嵌套的文檔的影響。默認是 avg,但是也可以是 sum,min,max,以及 none。 多層級的嵌套自動被支持,檢測,如果一個嵌套查詢存在另一個嵌套查詢中,將產生一個內部嵌套查詢去自動匹配有聯系的嵌套(不是根)。
                  <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>

                              哎呀哎呀视频在线观看