# Completely new to elasticsearch. Need basic help on how to properly search/index a file (mappings may be needed)

**URL:** <https://discuss.elastic.co/t/completely-new-to-elasticsearch-need-basic-help-on-how-to-properly-search-index-a-file-mappings-may-be-needed/92707>\
**Category:** Elasticsearch\
**Created:** [July 11, 2017, 7:06pm UTC](https://discuss.elastic.co/t/completely-new-to-elasticsearch-need-basic-help-on-how-to-properly-search-index-a-file-mappings-may-be-needed/92707 "2017-07-11T19:06:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticnewbie35](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@elasticnewbie35](https://discuss.elastic.co/u/elasticnewbie35)\
**Post date:** [July 11, 2017, 7:06pm UTC](https://discuss.elastic.co/t/completely-new-to-elasticsearch-need-basic-help-on-how-to-properly-search-index-a-file-mappings-may-be-needed/92707/1 "2017-07-11T19:06:03Z")

</div>

Hey Elastic dudes,

I only have a couple of years experience programming and am completely new to anything Elastic.

My problem is that I figured out how to submit a document to elastic search in kibana locally, but I can't search the document. For example, I can submit the document below:

PUT /logs/faultEvent/testDoc1  
{  
"entityId" : "someId",  
"eventData" : [  
{  
"logMsg": "someMsg",  
"logSeverity": "INFORMATION",  
"logTimestamp": "2016-11-28T18:25:31.1086304Z"  
},  
{  
"logMsg": "someMsg2",  
"logSeverity": "INFORMATION",  
"logTimestamp": "2016-11-28T18:25:31.1086304Z"  
}  
}]

However, when I go to search for "information" or "someId" in the discover tab, it finds nothing. I made sure the search time range is for 2 years so the log would be captured. At this point I figured I might need a mapping to tell elastic what I want to be able to search. After attempting many times to create a proper mapping and failing, this is what I still have:

PUT /logs  
{  
"mappings" : {  
"faultEvent" : {  
"\_all" : {"enabled": true},  
"properties": {  
"entityID" : {"type" : "keyword", "index": true},  
"eventData" : {"type" : "nested"}  
}  
}  
}  
}

Of note, I want elasticsearch to know that the eventData field may contain anywhere from 1 to n logs.

I'm sure I'm doing many things incorrectly, but I'm eager to learn if anyone is willing to help a newbie.

---

<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:** [August 8, 2017, 7:06pm UTC](https://discuss.elastic.co/t/completely-new-to-elasticsearch-need-basic-help-on-how-to-properly-search-index-a-file-mappings-may-be-needed/92707/2 "2017-08-08T19:06:18Z")

</div>

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