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

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 范圍(邊界)聚合器 在geohash聚合器的例子中,我們使用了一個矩形框過濾器來將結果限制在紐約區域。 然而,我們的結果都分布在曼哈頓。 當在地圖上呈現給用戶時,合理的方式是可以縮放到有數據的區域;地圖上有大量空白區域是沒有任何點分布的。 范圍過濾器是這么做得: 它計算出一個個小矩形框來覆蓋到所有的坐標點。 ```json GET /attractions/restaurant/_search?search_type=count { "query": { "filtered": { "filter": { "geo_bounding_box": { "location": { "top_left": { "lat": 40,8, "lon": -74.1 }, "bottom_right": { "lat": 40.4, "lon": -73.9 } } } } } }, "aggs": { "new_york": { "geohash_grid": { "field": "location", "precision": 5 } }, "map_zoom": { <1> "geo_bounds": { "field": "location" } } } } ``` - <1> 范圍聚合器會計算出一個最小的矩形框來覆蓋查詢結果的所有文檔。 返回結果包含了一個可以用來在地圖上縮放的矩形框: ```json ... "aggregations": { "map_zoom": { "bounds": { "top_left": { "lat": 40.722, "lon": -74.011 }, "bottom_right": { "lat": 40.715, "lon": -73.983 } } }, ... ``` 實際上,我們可以把矩形聚合器放到每一個 geohash 單元里,因為有坐標點的單元只占了所有單元的一部分: ```json GET /attractions/restaurant/_search?search_type=count { "query": { "filtered": { "filter": { "geo_bounding_box": { "location": { "top_left": { "lat": 40,8, "lon": -74.1 }, "bottom_right": { "lat": 40.4, "lon": -73.9 } } } } } }, "aggs": { "new_york": { "geohash_grid": { "field": "location", "precision": 5 }, "aggs": { "cell": { <1> "geo_bounds": { "field": "location" } } } } } } ``` - <1> 子聚合器 `cell_bounds` 會作用于每個 geohash 單元。 現在落在每個geohash單元中的點都有了一個所在的矩形框區域: ```json ... "aggregations": { "new_york": { "buckets": [ { "key": "dr5rs", "doc_count": 2, "cell": { "bounds": { "top_left": { "lat": 40.722, "lon": -73.989 }, "bottom_right": { "lat": 40.719, "lon": -73.983 } } } }, ... ```
                  <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>

                              哎呀哎呀视频在线观看