Hi people.
I need some help.
I'm trying to make a query via curl to get some fields of all elements of a shard.
I've tried this command:
curl -s -H 'Content-Type: application/json' 'http://localhost:9200/video/_search?pretty=true&size=1&from=0&stored_fields=file'
return
{
"took" : 1,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 6935,
"max_score" : 1.0,
"hits" : [
{
"_index" : "video",
"_type" : "_doc",
"_id" : "0a63bb26b0079d99267b99c2359021d5",
"_score" : 1.0
}
]
}
}
So I've tried
curl -s -H 'Content-Type: application/json' 'http://localhost:9200/video/_search?pretty=true&size=1&from=0' -d'{"stored_fields" : ["file"]}'
same results.
Using '_source' as value like
curl -s -H 'Content-Type: application/json' 'http://localhost:9200/libri/_search?pretty=true&size=1&from=0' -d'{"stored_fields" : "_source"}'
or
curl -s -H 'Content-Type: application/json' 'http://localhost:9200/video/_search?pretty=true&size=1&from=0&stored_fields=_source
return all _source properties.
There is a way to get only some properties inside _source?