# Can't see all fields after importing sample dataset but I can query

**URL:** <https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752>\
**Category:** Elasticsearch\
**Created:** [January 16, 2018, 4:15pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752 "2018-01-16T16:15:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdalla\_Sabri](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Abdalla\_Sabri](https://discuss.elastic.co/u/Abdalla_Sabri)\
**Post date:** [January 16, 2018, 4:15pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/1 "2018-01-16T16:15:50Z")

</div>

Hello,

I imported the bank accounts sample dataset (accounts.json) successfully into elastic 5.6.4 then I created my index pattern as ba\*

Now in the discover tab, I can do queries like (account\_number:\<100 AND balance:\>47500) and I get the correct amount of results but I dont see except the fields that begin with \_

Here is a screenshot

 ![ela1](https://us1.discourse-cdn.com/elastic/original/3X/d/c/dc6f54dc9404ba15666907f004adfa5e94206ade.png)

Same result even when I do match queries in curl (totally independent of kibana). Please let me know what I'm doing wrong.. why is \_source empty? Im sure all the fields/values got copied to ES but I can't view them.

Curl example  
curl test:9200/bank/account/\_search?q=Putnam  
`{"took":0,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":1,"max_score":4.6146765,"hits":[{"_index":"bank","_type":"account","_id":"25","_score":4.6146765,"_source":{}}]}}`

[GET /bank/\_mapping](https://pastebin.com/X399uRnU)

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 16, 2018, 4:17pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/2 "2018-01-16T16:17:19Z")

</div>

Can you refresh your index pattern? What happens?

---

<div class="post-metadata">

**Author:** ![Abdalla\_Sabri](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Abdalla\_Sabri](https://discuss.elastic.co/u/Abdalla_Sabri)\
**Post date:** [January 16, 2018, 4:25pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/3 "2018-01-16T16:25:23Z")

</div>

Hi val,

Thanks for the quick reply. I tried to refresh the index pattern from the following page

 ![elas2](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d718fa76a8581e80ac5d91a12595c71843819f8.png)

And I also restarted elastic and kibana just to make sure... but that made no difference, I still have the same view in the screenshot in my first post. I've been trying to figure out what I'm doing wrong for the past 3 hours with no luck. Thank you.

edit: one thing to note, in the discover tab of kibana, under Available fields.. if i uncheck 'Hide Missing Fields' then it shows me the field names like balance, etc.. but still the \_source is empty and no content is shown

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 16, 2018, 4:28pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/4 "2018-01-16T16:28:20Z")

</div>

Can you show how you imported the `accounts.json` file into ES?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 16, 2018, 4:28pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/5 "2018-01-16T16:28:36Z")

</div>

You should not define `_source` settings in your mapping.

---

<div class="post-metadata">

**Author:** ![Abdalla\_Sabri](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Abdalla\_Sabri](https://discuss.elastic.co/u/Abdalla_Sabri)\
**Post date:** [January 16, 2018, 4:33pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/6 "2018-01-16T16:33:20Z")

</div>

@val  
curl -H "Content-Type: application/x-ndjson" -XPOST "test:9200/bank/account/\_bulk?pretty" --data-binary @D:\accounts.json

result was successful with no errors

@dadoonet I only imported the accounts.json via the above command and then I created an index pattern with default options (no time-based events) called ba\* .. which is exactly what is described by elastic guides.. can you elaborate more please? what can I do to fix this?

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 16, 2018, 4:41pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/7 "2018-01-16T16:41:46Z")

</div>

You should remove all `_source` sections in your mapping. Not sure why they are in there.

---

<div class="post-metadata">

**Author:** ![Abdalla\_Sabri](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Abdalla\_Sabri](https://discuss.elastic.co/u/Abdalla_Sabri)\
**Post date:** [January 16, 2018, 4:50pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/8 "2018-01-16T16:50:49Z")

</div>

I've tried to delete all indices and index patterns and then re-imported the data.. checked the index pattern and \_source is there exactly like the above screenshot. If you guys say that \_source shouldn't be there then I don't know why it's automatically added to the mapping. Is there a way I can delete \_source from the mapping manually?

edit: Also what about the other fields with \_ like \_id / \_index / \_score ... are these normal to appear in the mapping? Or should be removed same as \_source?

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 16, 2018, 4:53pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/9 "2018-01-16T16:53:55Z")

</div>

maybe you have an index template installed. What do you get when running this:

```
curl localhost:9200/_cat/templates?v
```

---

<div class="post-metadata">

**Author:** ![Abdalla\_Sabri](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@Abdalla\_Sabri](https://discuss.elastic.co/u/Abdalla_Sabri)\
**Post date:** [January 16, 2018, 5:06pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/10 "2018-01-16T17:06:05Z")

</div>

You're right.. I totally forgot about index templates. Before beginning to experiment with the sample data I configured `elasticsearch-transport-couchbase` because my main objective is to ingest our companys couchbase data into elastic for statistical purposes.. and the couchbase plugin had me insert the following [template](https://pastebin.com/B1fmptTf), I didn't even know this template will apply to all data.

I removed the template and checked the mappings again, I no longer have \_source there and the data is showing correctly like described in the guides.

I know this question is unrelated to elastic but maybe someone can shed some light, why this template is required when transferring data from couchbase? And should it be removed on a successful import?

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [January 16, 2018, 5:10pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/11 "2018-01-16T17:10:13Z")

</div>

Cool, glad we figured it out and you can now see your data.

As for your other question, I guess that the Couchbase transport plugin requires some specific fields mappings, which is what you can achieve by using a template.

---

<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 13, 2018, 5:10pm UTC](https://discuss.elastic.co/t/cant-see-all-fields-after-importing-sample-dataset-but-i-can-query/115752/12 "2018-02-13T17:10:27Z")

</div>

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