# V0.16 upgrade: mapping issue

**URL:** https://discuss.elastic.co/t/v0-16-upgrade-mapping-issue/4406
**Category:** Elasticsearch
**Created:** [May 14, 2011, 9:54pm UTC](https://discuss.elastic.co/t/v0-16-upgrade-mapping-issue/4406 "2011-05-14T21:54:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![searchersteve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/searchersteve/32/3008_2.png) [@searchersteve](https://discuss.elastic.co/u/searchersteve)
#### Post date: [May 14, 2011, 9:54pm UTC](https://discuss.elastic.co/t/v0-16-upgrade-mapping-issue/4406/1 "2011-05-14T21:54:17Z")

</div>

Okay, I think this one might actually be a bug (??) I just checked, and I think it may be the same problem that [this guy](http://elasticsearch-users.115913.n3.nabble.com/Not-sorting-by-Date-td767833.html) reported on April 30.

I am mapping a date field (post\_date). I then do a search with {"sort": "post\_date"}. The error log comes back saying that no mapping is found for post\_date. But I also do a curl -XGET on the /\_mapping endpoint, and it shows that post\_date was in fact mapped.

Here is the gist:

[https://gist.github.com/d08372366044a9f6a20f](https://gist.github.com/d08372366044a9f6a20f)

Thank you for your patience, wise ones.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [May 14, 2011, 10:15pm UTC](https://discuss.elastic.co/t/v0-16-upgrade-mapping-issue/4406/2 "2011-05-14T22:15:55Z")

</div>

The same is not complete. You have several indices: social, -bulk and and data? When you do a search, you search on all of those (the URI is /\_search), the the mapping is defined only for social.

Also, your gist contains a malformed bulk structure. Each "item" needs to be on its own line, without any linefeeds. See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/bulk.html).  
On Sunday, May 15, 2011 at 12:54 AM, searchersteve wrote:

> Okay, I think this one might actually be a bug (??)
> 
> I am mapping a date field (post\_date). I then do a search with {"sort":  
> "post\_date"}. The error log comes back saying that no mapping is found for  
> post\_date. But I also do a curl -XGET on the /\_mapping endpoint, and it  
> shows that post\_date was in fact mapped.
> 
> Here is the gist:
> 
> [ElasticSearch mapping problem · GitHub](https://gist.github.com/d08372366044a9f6a20f)  
> [ElasticSearch mapping problem · GitHub](https://gist.github.com/d08372366044a9f6a20f)
> 
> Thank you for your patience, wise ones.
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/v0-16-upgrade-mapping-issue-tp2941518p2941518.html](http://elasticsearch-users.115913.n3.nabble.com/v0-16-upgrade-mapping-issue-tp2941518p2941518.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

### Author: ![searchersteve](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/searchersteve/32/3008_2.png) [@searchersteve](https://discuss.elastic.co/u/searchersteve)
#### Post date: [May 14, 2011, 11:02pm UTC](https://discuss.elastic.co/t/v0-16-upgrade-mapping-issue/4406/3 "2011-05-14T23:02:51Z")

</div>

Aha. I didn't realize that I had those additional indexes kicking around. Makes complete sense that you need a field to exist across indexes in order for results to be sorted.

As for the line feeds, I was aware of that. What showed up in the gist was not the way it runs in my app because I ran the json through a pretty -printer before posting -- but probably shouldn't have.

Thanks for the fast reply!!

The same is not complete. You have several indices: social, -bulk and and data? When you do a search, you search on all of those (the URI is /\_search), the the mapping is defined only for social.

Also, your gist contains a malformed bulk structure. Each "item" needs to be on its own line, without any linefeeds. See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/bulk.html).  
On Sunday, May 15, 2011 at 12:54 AM, searchersteve wrote:

> Okay, I think this one might actually be a bug (??)
> 
> I am mapping a date field (post\_date). I then do a search with {"sort":  
> "post\_date"}. The error log comes back saying that no mapping is found for  
> post\_date. But I also do a curl -XGET on the /\_mapping endpoint, and it  
> shows that post\_date was in fact mapped.
> 
> Here is the gist:
> 
> [ElasticSearch mapping problem · GitHub](https://gist.github.com/d08372366044a9f6a20f)  
> [ElasticSearch mapping problem · GitHub](https://gist.github.com/d08372366044a9f6a20f)
> 
> Thank you for your patience, wise ones.
> 
> --  
> View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/v0-16-upgrade-mapping-issue-tp2941518p2941518.html](http://elasticsearch-users.115913.n3.nabble.com/v0-16-upgrade-mapping-issue-tp2941518p2941518.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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: [July 6, 2017, 4:06am UTC](https://discuss.elastic.co/t/v0-16-upgrade-mapping-issue/4406/4 "2017-07-06T04:06:15Z")

</div>


