Skip to content

Instantly share code, notes, and snippets.

@nickt9999
Last active January 2, 2016 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickt9999/8226220 to your computer and use it in GitHub Desktop.
Save nickt9999/8226220 to your computer and use it in GitHub Desktop.
ElasticSearch Field not returned/stored
SEARCH: Running curl -XGET 'localhost:9200/2014010119/_search?pretty=true'
{
"took" : 44,
"timed_out" : false,
"_shards" : {
"total" : 3,
"successful" : 3,
"failed" : 0
},
"hits" : {
"total" : 9054648,
"max_score" : 1.0,
"hits" : [ {
"_index" : "2014010119",
"_type" : "varnish",
"_id" : "TL8_AY3ORJmWUm1vX2CB0w",
"_score" : 1.0,
"_source" : {
"protocol":"HTTP/1.0",
"cdn":"-",
"vary":"Accept-Encoding,ETag",
"browser":"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0",
"encoding":"gzip, deflate",
"varnhost":"varn24",
"loggedinuser":"n",
"origin":"-",
"cache_control":"-",

"content_length":"59498",
"varntype":"lookup",
"time":"01/Jan/2014:19:01:30+0000",
"webhost":"ws34",
"age":"55",
"resp_time":"0.000187874",
"method":"GET",
"response_code":"200",
"_src":"varnish",
"addr":"198.201.57.83"
}
}]
}
}
MAPPING : curl -XGET 'localhost:9200/-2014010119/_mapping?pretty=true'
{
"201401019" : {
"varnish" : {
"_timestamp" : {
"enabled" : true,
"store" : true
},
"properties" : {
"_src" : {
"type" : "string"
},
"accept" : {
"type" : "string"
},
"accept_language" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"addr" : {
"type" : "multi_field",
"fields" : {
"addr" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"ip" : {
"type" : "ip",
"include_in_all" : false
}
}
},
"age" : {
"type" : "integer"
},
"browser" : {
"type" : "multi_field",
"fields" : {
"browser" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"browser_idx" : {
"type" : "string",
"include_in_all" : false
}
}
},
"cache_control" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"cdn" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"content_length" : {
"type" : "integer"
},
"cookie" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"encoding" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"full_url" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"gateway" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"geo" : {
"type" : "string"
},
"host" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"keepalive" : {
"type" : "integer"
},
"location" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"loggedinuser" : {
"type" : "string"
},
"method" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"origin" : {
"type" : "string"
},
"protocol" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"ref" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"resp_time" : {
"type" : "float"
},
"response_code" : {
"type" : "string"
},
"ssl" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"time" : {
"type" : "string",
"store" : true
},
"uri" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"userid" : {
"type" : "string"
},
"varnhost" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"varnstat" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"varntype" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"vary" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
},
"webhost" : {
"type" : "string",
"index" : "not_analyzed",
"omit_norms" : true,
"index_options" : "docs"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment