Skip to content

Instantly share code, notes, and snippets.

@kakaner
Last active December 28, 2015 13:49
Show Gist options
  • Save kakaner/7510332 to your computer and use it in GitHub Desktop.
Save kakaner/7510332 to your computer and use it in GitHub Desktop.
Elasticsearch document existence inconsistencies example
HOST:9200/messages_2010_04/video/907
{
_index: "messages_2010_04",
_type: "video",
_id: "907",
exists: false
}
HOST:9200/_search
{
took: 11,
timed_out: false,
_shards: {
total: 64,
successful: 64,
failed: 0
},
hits: {
total: 6081,
max_score: 1,
hits: [
{
_index: "messages_2010_04",
_type: "video",
_id: "907",
_score: 1,
_source: {
id: 907,
created_at: 1270116994000,
creator_id: 49
}
}
]
}
HOST:9200/messages_2010_04/video/_search
{
took: 50,
timed_out: false,
_shards: {
total: 64,
successful: 64,
failed: 0
},
hits: {
total: 5000,
max_score: 1,
hits: [
{
_index: "messages_2010_04",
_type: "video",
_id: "907",
_score: 1,
_source: {
id: 907,
created_at: 1270116994000,
creator_id: 49
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment