curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/test" -XPUT -d '{
"mappings": { "dynamic": false,
"properties": { "foo": {"type": "long"}, "bar": {"type": "integer"}
}
}
}'
curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/test2" -XPUT -d '{
"mappings": { "dynamic": false,
"properties": { "bar": {"type": "integer"}
}
}
}'
curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/test3" -XPUT -d '{
"mappings": { "dynamic": false,
"properties": { "foo": {"type": "integer"}, "bar": {"type": "integer"}
}
}
}'
curl -u elastic:password -HContent-Type:application/json 'localhost:9200/test/_doc?refresh' -d'{"foo": 5, "bar": 10}'
curl -u elastic:password -HContent-Type:application/json 'localhost:9200/test2/_doc?refresh' -d'{"foo": 10, "bar": 10}'
curl -u elastic:password -HContent-Type:application/json 'localhost:9200/test3/_doc?refresh' -d'{"foo": 10, "bar": 10}'
curl -u elastic:password -H "Content-Type: application/json" "127.0.0.1:9200/_query?format=txt" -d '
{
"query": "SET unmapped_fields=\"load\"; FROM test, test2, test3 | KEEP foo | eval foo = foo::integer"}'
foo
---------------
null
5
10
Relates #138888