Here is my mapping:
"mappings" : {
"mytype" : {
"_meta" : {
"abs_parent_id" : {"type" : "integer"}
},
"properties" : {
"title" : {"type" : "text"},
"body" : {"type" : "text"},
"tagnames" : {"type" : "text"},
"nodetype" : {"type" : "text"},
"author_id" : {"type" : "integer"},
"author_name" : {"type" : "text"},
}
}
}
I expect this to be the response when I do http://localhost:9200/myindex/mytype/_search?pretty:
"hits" : [
{
"_index" : "myindex",
"_type" : "mytype",
"_id" : "1",
"_score" : 1.0,
"_meta" : {
"abs_parent_id" : null
},
"_source" : {
"body" : "<p>Some statement</p>",
"tagnames" : "tag",
"title" : "question",
"author_name" : "author",
"node_type" : "question",
"author_id" : 1000
}
},
But instead I get this as the response:
"hits" : [
{
"_index" : "myindex",
"_type" : "mytype",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"_meta" : {
"abs_parent_id" : null
},
"body" : "<p>Some statement</p>",
"tagnames" : "tag",
"title" : "question",
"author_name" : "author",
"node_type" : "question",
"author_id" : 1000
}
},
I need to have _meta field outside of _source so that I can disable _source on my queries which will save memory. Can anyone suggest a solution?
Aren't all fields which start with an underscore supposed to be outside of _source ?
Side note: I don't think this is relevant, but I'm doing all this with elasticsearch-py.