# Search Error When Using GET

**URL:** <https://discuss.elastic.co/t/search-error-when-using-get/2897>\
**Category:** Elasticsearch\
**Created:** [April 7, 2010, 9:33pm UTC](https://discuss.elastic.co/t/search-error-when-using-get/2897 "2010-04-07T21:33:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Walendo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walendo/32/3348_2.png) [@Walendo](https://discuss.elastic.co/u/Walendo)\
**Post date:** [April 7, 2010, 9:33pm UTC](https://discuss.elastic.co/t/search-error-when-using-get/2897/1 "2010-04-07T21:33:58Z")

</div>

Hi,

I'm trying to search one field (code) of all the cities once, using a  
GET method with the bellow query String:

[http://localhost:9200/ig/city/\_search?q=code%20%3A%20[0%20TO%2010000]&size=10000](http://localhost:9200/ig/city/_search?q=code%20%3A%20%5B0%20TO%2010000%5D&size=10000)

[[http://localhost:9200/ig/city/\_search?q=code:](http://localhost:9200/ig/city/_search?q=code:)[0 TO 10000]&size=10000]

Then I got this error:

{"\_shards":{"total":5,"successful":0,"failed":5,"failures":  
[{"reason":"NullPointerException[null]"},  
{"reason":"NullPointerException[null]"},{"reason":"Unknown"},  
{"reason":"Unknown"},{"reason":"Unknown"}]},"hits":{"total":0,"hits":  
[]}}

When I ommit the size param, the query works, but it only returns 10  
objects.

When I use the Post method with the body bellow it works:

{  
"from" : 0, "size" : 10000, "fields" : "codigo",  
"query" : {  
"matchAll" : { }  
}  
}

How can I do the same thing using the GET method?

Thanks.

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [April 8, 2010, 9:22am UTC](https://discuss.elastic.co/t/search-error-when-using-get/2897/2 "2010-04-08T09:22:31Z")

</div>

Hi Jorge

> I'm trying to search one field (code) of all the cities once, using a  
> GET method with the bellow query String:
> 
> [http://localhost:9200/ig/city/\_search?q=code%20%3A%20[0%20TO%2010000]&size=10000](http://localhost:9200/ig/city/_search?q=code%20%3A%20%5B0%20TO%2010000%5D&size=10000)
> 
> [[http://localhost:9200/ig/city/\_search?q=code:](http://localhost:9200/ig/city/_search?q=code:)[0 TO 10000]&size=10000]

When I try this locally, it works for me (or at least, given that I  
don't have your data, I get no errors).

What version are you using? I'd suggest downloading the latest from  
github.

## clint

Web Announcements Limited is a company registered in England and Wales,  
with company number 05608868, with registered address at 10 Arvon Road,  
London, N5 1PR.

---

<div class="post-metadata">

**Author:** ![Walendo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walendo/32/3348_2.png) [@Walendo](https://discuss.elastic.co/u/Walendo)\
**Post date:** [April 8, 2010, 2:11pm UTC](https://discuss.elastic.co/t/search-error-when-using-get/2897/3 "2010-04-08T14:11:54Z")

</div>

I downloaded the latest version from github and the GET request worked  
now, however the POST version doesn't work anymore (something like  
matchAll).

Thanks for your help.

On 8 abr, 06:22, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:

> Hi Jorge
> 
> > I'm trying to search one field (code) of all the cities once, using a  
> > GET method with the bellow query String:
> 
> > [http://localhost:9200/ig/city/\_search?q=code%20%3A%20[0%20TO%201000](http://localhost:9200/ig/city/_search?q=code%20%3A%20%5B0%20TO%201000)...
> 
> > [[http://localhost:9200/ig/city/\_search?q=code:](http://localhost:9200/ig/city/_search?q=code:)[0 TO 10000]&size=10000]
> 
> When I try this locally, it works for me (or at least, given that I  
> don't have your data, I get no errors).
> 
> What version are you using? I'd suggest downloading the latest from  
> github.
> 
> ## clint
> 
> Web Announcements Limited is a company registered in England and Wales,  
> with company number 05608868, with registered address at 10 Arvon Road,  
> London, N5 1PR.

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [April 8, 2010, 2:38pm UTC](https://discuss.elastic.co/t/search-error-when-using-get/2897/4 "2010-04-08T14:38:45Z")

</div>

On Thu, 2010-04-08 at 07:11 -0700, Walendo wrote:

> I downloaded the latest version from github and the GET request worked  
> now, however the POST version doesn't work anymore (something like  
> matchAll).

Yes - there has been a Big Rename: camelCase is  
now\_with\_underscores\_instead.

So "matchAll" has been renamed as "match\_all"

clint

> Thanks for your help.
> 
> On 8 abr, 06:22, Clinton Gormley [clin...@iannounce.co.uk](mailto:clin...@iannounce.co.uk) wrote:
> 
> > Hi Jorge
> > 
> > > I'm trying to search one field (code) of all the cities once, using a  
> > > GET method with the bellow query String:
> > 
> > > [http://localhost:9200/ig/city/\_search?q=code%20%3A%20[0%20TO%201000](http://localhost:9200/ig/city/_search?q=code%20%3A%20%5B0%20TO%201000)...
> > 
> > > [[http://localhost:9200/ig/city/\_search?q=code:](http://localhost:9200/ig/city/_search?q=code:)[0 TO 10000]&size=10000]
> > 
> > When I try this locally, it works for me (or at least, given that I  
> > don't have your data, I get no errors).
> > 
> > What version are you using? I'd suggest downloading the latest from  
> > github.
> > 
> > ## clint
> > 
> > Web Announcements Limited is a company registered in England and Wales,  
> > with company number 05608868, with registered address at 10 Arvon Road,  
> > London, N5 1PR.  
> > --  
> > Web Announcements Limited is a company registered in England and Wales,  
> > with company number 05608868, with registered address at 10 Arvon Road,  
> > London, N5 1PR.

---

<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, 4:24am UTC](https://discuss.elastic.co/t/search-error-when-using-get/2897/5 "2017-07-06T04:24:46Z")

</div>


