# Vegaのdataにindex.max\_result\_window以上を渡したい

**URL:** <https://discuss.elastic.co/t/vega-data-index-max-result-window/127720>\
**Category:** 日本語による質問・議論はこちら\
**Created:** [April 12, 2018, 3:01am UTC](https://discuss.elastic.co/t/vega-data-index-max-result-window/127720 "2018-04-12T03:01:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yopya](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@yopya](https://discuss.elastic.co/u/yopya)\
**Post date:** [April 12, 2018, 3:01am UTC](https://discuss.elastic.co/t/vega-data-index-max-result-window/127720/1 "2018-04-12T03:01:47Z")

</div>

お世話になります。

Vegaによる描画の際に10000件を超えるデータを渡すことは可能でしょうか。  
一括でデータを渡す必要があると思いますので、Scroll や Search After での実現は難しいと考えております。  
（そもそもどう書けばいいのか分からない。。。）

現在は以下のようなクエリでとりあえず指定期間内の直近10000件を描画している状況です。

```
  data: {
    url: {
      index: index-*
      body: {
        size: 10000
        _source: ["hoge", "fuga", "piyo"]
        sort: {timestamp: "desc"}
        query: {
          bool: {
            must: [
              %dashboard_context-must_clause%
              {range: {timestamp: {%timefilter%: true}}}
              ...
            ]
            must_not: [
              "%dashboard_context-must_not_clause%"
              ...
            ]
          }
        }
      }
    }
    format: {property: "hits.hits"}
  }

```

よろしくお願いいたします。

---

<div class="post-metadata">

**Author:** ![yopya](https://avatars.discourse-cdn.com/v4/letter/y/77aa72/32.png) [@yopya](https://discuss.elastic.co/u/yopya)\
**Post date:** [April 12, 2018, 4:48am UTC](https://discuss.elastic.co/t/vega-data-index-max-result-window/127720/3 "2018-04-12T04:48:58Z")

</div>

すみません。自己解決？しました。

一時的にmax\_result\_windowの設定を変更してみたところ、  
そもそも描画に時間がかかってしまい使用に耐えませんでした。

いい塩梅の値を探って妥協しようと思います。

```
PUT /index-*/_settings
{
    "index" : {
        "max_result_window" : 100000
    }
}
```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 10, 2018, 4:49am UTC](https://discuss.elastic.co/t/vega-data-index-max-result-window/127720/4 "2018-05-10T04:49:05Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
