Skip to content

Instantly share code, notes, and snippets.

@logosdev
Created April 4, 2014 22:55
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 logosdev/d236420f7d9e3806755d to your computer and use it in GitHub Desktop.
Save logosdev/d236420f7d9e3806755d to your computer and use it in GitHub Desktop.
http://localhost:9200/a/b/_mapping?pretty
{
"a" : {
"mappings" : {
"b" : {
"properties" : {
"plays" : {
"type" : "long"
},
"wins" : {
"type" : "long"
}
}
}
}
}
}
curl -XPOST "http://localhost:9200/a/b" -d '{
"wins" : 1,
"plays" : 2
}
'
curl -XPOST "http://localhost:9200/a/b" -d '{
"wins" : 2,
"plays" : 2
}
'
curl "http://localhost:9200/a/b/_count" -d '{
"query": {
"term": {
"wins":2
}
}
}
'
> {"count":1,"_shards":{"total":5,"successful":5,"failed":0}}
curl "http://localhost:9200/a/b/_count" -d '{
"filtered": {
"filter": {
"terms": {
wins: [2]
}
}
}
}
'
> {"count":0,"_shards":{"total":5,"successful":0,"failed":5,"failures":[{"index":"a","shard":4,"reason":"BroadcastShardOperationFailedException[[a][4] ]; nested: QueryParsingException[[a] request does not support [filtered]]; "},{"index":"a","shard":3,"reason":"BroadcastShardOperationFailedException[[a][3] ]; nested: QueryParsingException[[a] request does not support [filtered]]; "},{"index":"a","shard":2,"reason":"BroadcastShardOperationFailedException[[a][2] ]; nested: QueryParsingException[[a] request does not support [filtered]]; "},{"index":"a","shard":0,"reason":"BroadcastShardOperationFailedException[[a][0] ]; nested: QueryParsingException[[a] request does not support [filtered]]; "},{"index":"a","shard":1,"reason":"BroadcastShardOperationFailedException[[a][1] ]; nested: QueryParsingException[[a] request does not support [filtered]]; "}]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment