# Where is the error on my mget request?... LoL

**URL:** <https://discuss.elastic.co/t/where-is-the-error-on-my-mget-request-lol/14069>\
**Category:** Elasticsearch\
**Created:** [October 23, 2013, 10:33am UTC](https://discuss.elastic.co/t/where-is-the-error-on-my-mget-request-lol/14069 "2013-10-23T10:33:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo3027](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@pablo3027](https://discuss.elastic.co/u/pablo3027)\
**Post date:** [October 23, 2013, 10:33am UTC](https://discuss.elastic.co/t/where-is-the-error-on-my-mget-request-lol/14069/1 "2013-10-23T10:33:38Z")

</div>

I am tray to do an mget on elasticSearch but this not seems work fine:

My request :

curl -XPOST "[http://localhost:9200/index1/tip1/\_mget?routing=XXXXX-2-yy](http://localhost:9200/index1/tip1/_mget?routing=XXXXX-2-yy)"  
-d'{"ids": ["2-8","2-26","2-1152"]}'

Response :  
{  
"docs": [  
{  
"\_index": "custodiafe-indx1",  
"\_type": "tip1",  
"\_id": "2-8",  
"exists": false  
},  
{  
"\_index": "indx1",  
"\_type": "tip1",  
"\_id": "2-26",  
"exists": false  
},  
{  
"\_index": "indx1",  
"\_type": "tip1",  
"\_id": "2-1152",  
"exists": false  
}  
]  
}

With normal search over index . I can find the elements with this ids

curl -XPOST "[http://localhost:9200/indx1/tip1/\_search?routing=XXXX-2-yyy](http://localhost:9200/indx1/tip1/_search?routing=XXXX-2-yyy)"  
-d'{ "query": {"match\_all": {},"filtered": { "query": {"match\_all":  
{}},"filter": {"ids": {"values": ["2-8","2-26","2-1152"]}}}}}'

{  
"took": 96,  
"timed\_out": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"failed": 0  
},  
"hits": {  
"total": 2,  
"max\_score": 1,  
"hits": [  
{  
"\_index": "indx1",  
"\_type": "tip1",  
"\_id": "2-8",  
"\_score": 1,  
"\_source": {  
"name" : "aa1"  
...  
...  
},  
{  
"\_index": "indx1",  
"\_type": "tip1",  
"\_id": "2-26",  
"\_score": 1,  
"\_source": {  
"name" : "aa2"  
...  
...  
}  
}  
]  
}  
}

Where is the error in the mget request???

Help!!!!!

Thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 23, 2013, 11:13am UTC](https://discuss.elastic.co/t/where-is-the-error-on-my-mget-request-lol/14069/2 "2013-10-23T11:13:56Z")

</div>

Hey,

can you try to use the \_routing fields inside each of the get requests  
instead of a global HTTP parameter and see if it works?

--Alex

On Wed, Oct 23, 2013 at 12:33 PM, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com) wrote:

> I am tray to do an mget on elasticSearch but this not seems work fine:
> 
> My request :
> 
> curl -XPOST "[http://localhost:9200/index1/tip1/\_mget?routing=XXXXX-2-yy](http://localhost:9200/index1/tip1/_mget?routing=XXXXX-2-yy)"  
> -d'{"ids": ["2-8","2-26","2-1152"]}'
> 
> Response :  
> {  
> "docs": [  
> {  
> "\_index": "custodiafe-indx1",  
> "\_type": "tip1",  
> "\_id": "2-8",  
> "exists": false  
> },  
> {  
> "\_index": "indx1",  
> "\_type": "tip1",  
> "\_id": "2-26",  
> "exists": false  
> },  
> {  
> "\_index": "indx1",  
> "\_type": "tip1",  
> "\_id": "2-1152",  
> "exists": false  
> }  
> ]  
> }
> 
> With normal search over index . I can find the elements with this ids
> 
> curl -XPOST "[http://localhost:9200/indx1/tip1/\_search?routing=XXXX-2-yyy](http://localhost:9200/indx1/tip1/_search?routing=XXXX-2-yyy)"  
> -d'{ "query": {"match\_all": {},"filtered": { "query": {"match\_all":  
> {}},"filter": {"ids": {"values": ["2-8","2-26","2-1152"]}}}}}'
> 
> {  
> "took": 96,  
> "timed\_out": false,  
> "\_shards": {  
> "total": 1,  
> "successful": 1,  
> "failed": 0  
> },  
> "hits": {  
> "total": 2,  
> "max\_score": 1,  
> "hits": [  
> {  
> "\_index": "indx1",  
> "\_type": "tip1",  
> "\_id": "2-8",  
> "\_score": 1,  
> "\_source": {  
> "name" : "aa1"  
> ...  
> ...  
> },  
> {  
> "\_index": "indx1",  
> "\_type": "tip1",  
> "\_id": "2-26",  
> "\_score": 1,  
> "\_source": {  
> "name" : "aa2"  
> ...  
> ...  
> }  
> }  
> ]  
> }  
> }
> 
> Where is the error in the mget request???
> 
> Help!!!!!
> 
> Thanks
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![pablo3027](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@pablo3027](https://discuss.elastic.co/u/pablo3027)\
**Post date:** [October 23, 2013, 11:36am UTC](https://discuss.elastic.co/t/where-is-the-error-on-my-mget-request-lol/14069/3 "2013-10-23T11:36:28Z")

</div>

The same result... grrrr

curl -XPOST "[http://localhost:9200/index1/tip1/\_mget?](http://localhost:9200/index1/tip1/_mget?)[http://localhost:9200/index1/tip1/\_mget?routing=XXXXX-2-yy](http://localhost:9200/index1/tip1/_mget?routing=XXXXX-2-yy)  
idTip=XXXX&idkind=2&type=yyy

{  
"docs": [  
{  
"\_index": "custodiafe-indx1",  
"\_type": "invoice",  
"\_id": "2-8",  
"exists": false  
},  
{  
"\_index": "custodiafe-indx1",  
"\_type": "invoice",  
"\_id": "2-26",  
"exists": false  
},  
{  
"\_index": "custodiafe-indx1",  
"\_type": "invoice",  
"\_id": "2-1152",  
"exists": false  
}  
]  
}

2013/10/23 Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)

> Hey,
> 
> can you try to use the \_routing fields inside each of the get requests  
> instead of a global HTTP parameter and see if it works?
> 
> --Alex
> 
> On Wed, Oct 23, 2013 at 12:33 PM, Pablo Blasco [pablo3027@gmail.com](mailto:pablo3027@gmail.com)wrote:
> 
> > I am tray to do an mget on elasticSearch but this not seems work fine:
> > 
> > My request :
> > 
> > curl -XPOST "[http://localhost:9200/index1/tip1/\_mget?routing=XXXXX-2-yy](http://localhost:9200/index1/tip1/_mget?routing=XXXXX-2-yy)"  
> > -d'{"ids": ["2-8","2-26","2-1152"]}'
> > 
> > Response :  
> > {  
> > "docs": [  
> > {  
> > "\_index": "custodiafe-indx1",  
> > "\_type": "tip1",  
> > "\_id": "2-8",  
> > "exists": false  
> > },  
> > {  
> > "\_index": "indx1",  
> > "\_type": "tip1",  
> > "\_id": "2-26",  
> > "exists": false  
> > },  
> > {  
> > "\_index": "indx1",  
> > "\_type": "tip1",  
> > "\_id": "2-1152",  
> > "exists": false  
> > }  
> > ]  
> > }
> > 
> > With normal search over index . I can find the elements with this ids
> > 
> > curl -XPOST "[http://localhost:9200/indx1/tip1/\_search?routing=XXXX-2-yyy](http://localhost:9200/indx1/tip1/_search?routing=XXXX-2-yyy)"  
> > -d'{ "query": {"match\_all": {},"filtered": { "query": {"match\_all":  
> > {}},"filter": {"ids": {"values": ["2-8","2-26","2-1152"]}}}}}'
> > 
> > {  
> > "took": 96,  
> > "timed\_out": false,  
> > "\_shards": {  
> > "total": 1,  
> > "successful": 1,  
> > "failed": 0  
> > },  
> > "hits": {  
> > "total": 2,  
> > "max\_score": 1,  
> > "hits": [  
> > {  
> > "\_index": "indx1",  
> > "\_type": "tip1",  
> > "\_id": "2-8",  
> > "\_score": 1,  
> > "\_source": {  
> > "name" : "aa1"  
> > ...  
> > ...  
> > },  
> > {  
> > "\_index": "indx1",  
> > "\_type": "tip1",  
> > "\_id": "2-26",  
> > "\_score": 1,  
> > "\_source": {  
> > "name" : "aa2"  
> > ...  
> > ...  
> > }  
> > }  
> > ]  
> > }  
> > }
> > 
> > Where is the error in the mget request???
> > 
> > Help!!!!!
> > 
> > Thanks
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/gNVgYC0DGNA/unsubscribe](https://groups.google.com/d/topic/elasticsearch/gNVgYC0DGNA/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Saludos,  
Pablo Blasco Martinavarro.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:11am UTC](https://discuss.elastic.co/t/where-is-the-error-on-my-mget-request-lol/14069/4 "2017-07-06T02:11:02Z")

</div>


