V0.16 upgrade: mapping issue


(searchersteve) #1

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 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

Thank you for your patience, wise ones.


(Shay Banon) #2

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 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:

https://gist.github.com/d08372366044a9f6a20f
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
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(searchersteve) #3

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 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:

https://gist.github.com/d08372366044a9f6a20f
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
Sent from the ElasticSearch Users mailing list archive at Nabble.com.


(system) #4