# Load Eland dataframe partially by query

**URL:** <https://discuss.elastic.co/t/load-eland-dataframe-partially-by-query/323180>\
**Category:** Elasticsearch\
**Created:** [January 14, 2023, 2:15pm UTC](https://discuss.elastic.co/t/load-eland-dataframe-partially-by-query/323180 "2023-01-14T14:15:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mruiter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mruiter/32/97482_2.png) [@mruiter](https://discuss.elastic.co/u/mruiter)\
**Post date:** [January 14, 2023, 2:15pm UTC](https://discuss.elastic.co/t/load-eland-dataframe-partially-by-query/323180/1 "2023-01-14T14:15:13Z")

</div>

I'm trying to fetch data from Elasticsearch into an Eland dataframe partially, because it takes too much time to load the entire index.

The following works, except for the \_query\_compiler. The official [Eland docs](https://eland.readthedocs.io/en/latest/reference/api/eland.DataFrame.html) contains the parameter, but no description about how it works. I'm not even sure if this is the right approach though.

```plaintext
password = '..'
ip = '..'

es = Elasticsearch(hosts='https://{}:{}@{}'.format(username, password, ip), request_timeout=300, ca_certs='./Security/cert.pem')

index_name = '..'
index = ed.DataFrame(es_client=es, es_index_pattern=index_name, _query_compiler=???).to_pandas()

```

The following query seems to work, except for the part that it's not an Eland dataframe. (Also, the body parameter is deprecated but w/e.) There is a [related question](https://stackoverflow.com/questions/70685986/how-to-search-exact-index-not-index-pattern-in-elasticsearch-eland-updated) here, but it's not helping towards a solution.

```auto
search_body = {
            "query": {
                "match": {
                    "some_field": "true"
                }
              }
        }

results = es.search(index=index_name, body=search_body)

```

---

<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:** [February 11, 2023, 2:16pm UTC](https://discuss.elastic.co/t/load-eland-dataframe-partially-by-query/323180/2 "2023-02-11T14:16:03Z")

</div>

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