# Issue with getting data back when using Docker

**URL:** <https://discuss.elastic.co/t/issue-with-getting-data-back-when-using-docker/221949>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 3, 2020, 10:11pm UTC](https://discuss.elastic.co/t/issue-with-getting-data-back-when-using-docker/221949 "2020-03-03T22:11:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taiv13](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@Taiv13](https://discuss.elastic.co/u/Taiv13)\
**Post date:** [March 3, 2020, 10:11pm UTC](https://discuss.elastic.co/t/issue-with-getting-data-back-when-using-docker/221949/1 "2020-03-03T22:11:14Z")

</div>

Hello,

I have come across a problem where I am not getting any data back when I try to \_search an index. I previously followed along with [this](https://markheath.net/post/exploring-elasticsearch-with-docker) tutorial. Everything went fine when following along and using the online "Docker Playground" that is mentioned. However, I am currently trying to do something similar on my own machine which is giving me some trouble.

I am using the docker-compose file found on the [Install Elasticsearch with Docker](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) page to create my cluster. I get success responses when creating indexes and when putting documents into those indexes. Whenever I try to query the index I get an empty result set back.

```auto
PS C:\WINDOWS\system32> Invoke-RestMethod -Method Put `
>> -Uri "http://localhost:9200/customer/_doc/3?pretty" `
>> -ContentType "application/json" -Body @"
>> { "name" : "John Doe" }
>> "@

_index : customer
_type : _doc
_id : 3
_version : 1
result : created
_shards : @{total=2; successful=2; failed=0}
_seq_no : 1
_primary_term : 3

```

However, when I try to retrieve the documents in the index I get:

```auto
PS C:\WINDOWS\system32> Invoke-RestMethod http://localhost:9200/customer/_search?pretty

took timed_out _shards hits
---- --------- ------- ----
  45 False @{total=1; successful=1; skipped=0; failed=0} @{total=; max_score=1.0; hits=System.Object[]}

```

I'm at a bit of a loss because I am getting successful responses from the creation of the documents, but they are not being returned when I try to query them.

Thank you for any help in advance!

---

<div class="post-metadata">

**Author:** ![Taiv13](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@Taiv13](https://discuss.elastic.co/u/Taiv13)\
**Post date:** [March 5, 2020, 3:43pm UTC](https://discuss.elastic.co/t/issue-with-getting-data-back-when-using-docker/221949/2 "2020-03-05T15:43:21Z")

</div>

**UPDATE**

I have solved the issue and I believe that the problem was my inexperience using PowerShell. However, once I went back and used the docker-compose file with the Kibana and head plug in from [the first tutorial I linked](https://markheath.net/post/exploring-elasticsearch-with-docker) I was able to see that the "total" property of the "hits" was showing the correct number. I'm not sure if this was just another thing I was messing up with PS or if it has something to do with the docker file that was being used, but the issue is solved now none the less.

---

<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:** [April 2, 2020, 3:43pm UTC](https://discuss.elastic.co/t/issue-with-getting-data-back-when-using-docker/221949/3 "2020-04-02T15:43:23Z")

</div>

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