Hello All, I am trying to run a query which returns only the id's for
a given index without the source but I am unable to do it.
I try with a query like this:
{
"fields": [
"price",
"_id"
],
"_source": {
"enabled": false
},
"query": {
"match_all": {}
}
}
I know that I can disable the source field generally but we need it
for other queries.
Just use fields=
On Fri, Aug 12, 2011 at 12:32 PM, Ridvan Gyundogan [email protected] wrote:
Hello All, I am trying to run a query which returns only the id's for
a given index without the source but I am unable to do it.
I try with a query like this:
{
"fields": [
"price",
"_id"
],
"_source": {
"enabled": false
},
"query": {
"match_all": {}
}
}
I know that I can disable the source field generally but we need it
for other queries.
--
http://www.sfgdornbirn.at
http://www.mcb-bregenz.at
roger_2
(roger-2)
August 12, 2011, 12:33pm
3
Hi Jürgen
It's a long time ago, but nice to meet you here again!
Let me know if you need an elasticsearch stub server setup
for python unit testing!
Regards
Roger Ineichen
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected] ] Im
Auftrag von Jürgen kartnaller
Gesendet: Freitag, 12. August 2011 14:27
An: [email protected]
Betreff: Re: Query returning only ids
Just use fields=
On Fri, Aug 12, 2011 at 12:32 PM, Ridvan Gyundogan [email protected]
wrote:
Hello All, I am trying to run a query which returns only the id's
for
a given index without the source but I am unable to do it.
I try with a query like this:
{
"fields": [
"price",
"_id"
],
"_source": {
"enabled": false
},
"query": {
"match_all": {}
}
}
I know that I can disable the source field generally but we need it
for other queries.
--
http://www.sfgdornbirn.at
http://www.mcb-bregenz.at
Thanks Jürgen,
I actually tried fields but was putting it inside the query, the
following worked:
curl -XGET http://localhost:9200/giftsplusindex/giftsplusproduct/_search?pretty=true
-d '{
"fields" : ["id", "price"],
"query" : {
"match_all": {}
}
}'
On Aug 12, 3:33 pm, "Roger" [email protected] wrote:
Hi Jürgen
It's a long time ago, but nice to meet you here again!
Let me know if you need an elasticsearch stub server setup
for python unit testing!
Regards
Roger Ineichen
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected] ] Im
Auftrag von Jürgen kartnaller
Gesendet: Freitag, 12. August 2011 14:27
An: [email protected]
Betreff: Re: Query returning only ids
Just use fields=
On Fri, Aug 12, 2011 at 12:32 PM, Ridvan Gyundogan [email protected]
wrote:
Hello All, I am trying to run a query which returns only the id's
for
a given index without the source but I am unable to do it.
I try with a query like this:
{
"fields": [
"price",
"_id"
],
"_source": {
"enabled": false
},
"query": {
"match_all": {}
}
}
I know that I can disable the source field generally but we need it
for other queries.
--
http://www.sfgdornbirn.at
http://www.mcb-bregenz.at