# Problem with geo\_points search queries

**URL:** https://discuss.elastic.co/t/problem-with-geo-points-search-queries/7295
**Category:** Elasticsearch
**Created:** [April 11, 2012, 1:31pm UTC](https://discuss.elastic.co/t/problem-with-geo-points-search-queries/7295 "2012-04-11T13:31:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![luc3k2202](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@luc3k2202](https://discuss.elastic.co/u/luc3k2202)
#### Post date: [April 11, 2012, 1:31pm UTC](https://discuss.elastic.co/t/problem-with-geo-points-search-queries/7295/1 "2012-04-11T13:31:11Z")

</div>

Hello, we are bulk indexing some geo\_points informations and thats is going  
ok. We encountering problem with this query to elastic:

{ "query" : { "filtered" : { "filter" : { "geo\_distance" : { "coords" : [  
53.441,  
14.545  
],  
"distance" : "2km",  
"distance\_type" : "arc"  
} },  
"query" : { "match\_all" : { } }  
} },  
"size" : 1  
}

We have that Error:

> <http://pastebin.com/raw/FeNbQMcx>

  
We are observing huge jump in heap memory (set to 1gb min/max). This is  
our settings (we are using clean elastic configuration becouse we cant  
change production configuration for testing):

transport.tcp.compress: true  
http.max\_content\_length: 1000mb  
jmx.create\_connector: true  
index.cache.field.type: soft

without index.cache.field.type we encounter the same problem.

Our \_status:

> <http://pastebin.com/raw/ewZdfdTN>

Sorry, for my English.

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [April 13, 2012, 12:08pm UTC](https://discuss.elastic.co/t/problem-with-geo-points-search-queries/7295/2 "2012-04-13T12:08:55Z")

</div>

Hi,

In order to execute the geo related filters, the values for them need to  
be loaded to memory, you simply need to increase the memory allocated to  
elasticsearch or start more nodes in the cluster.

On Wed, Apr 11, 2012 at 4:31 PM, luc3k2202 [luc3k2202@gmail.com](mailto:luc3k2202@gmail.com) wrote:

> Hello, we are bulk indexing some geo\_points informations and thats is  
> going ok. We encountering problem with this query to elastic:
> 
> { "query" : { "filtered" : { "filter" : { "geo\_distance" : { "coords" : [  
> 53.441,  
> 14.545  
> ],  
> "distance" : "2km",  
> "distance\_type" : "arc"  
> } },  
> "query" : { "match\_all" : { } }  
> } },  
> "size" : 1  
> }
> 
> We have that Error:  
> [http://pastebin.com/raw.php?i=FeNbQMcx](http://pastebin.com/raw.php?i=FeNbQMcx)  
> We are observing huge jump in heap memory (set to 1gb min/max). This is  
> our settings (we are using clean elastic configuration becouse we cant  
> change production configuration for testing):
> 
> transport.tcp.compress: true  
> http.max\_content\_length: 1000mb  
> jmx.create\_connector: true  
> index.cache.field.type: soft
> 
> without index.cache.field.type we encounter the same problem.
> 
> Our \_status:  
> [http://pastebin.com/raw.php?i=ewZdfdTN](http://pastebin.com/raw.php?i=ewZdfdTN)
> 
> Sorry, for my English.

---

<div class="post-metadata">

### Author: ![Jason\_5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jason_5/32/1873_2.png) [@Jason\_5](https://discuss.elastic.co/u/Jason_5)
#### Post date: [January 7, 2013, 10:18pm UTC](https://discuss.elastic.co/t/problem-with-geo-points-search-queries/7295/3 "2013-01-07T22:18:38Z")

</div>

I'm having the same issue, but simply adding nodes is not really a viable  
option for us.

We are hitting this error on a node with around 4 million records (of which  
only around 40% have a location) and 2GB of RAM, but we expect to have  
around 400 Million records. We can't plausibly run 100 nodes for 400  
Million records. I had wondered if indexing the lat\_lon on the field would  
help but we also have more than one geo\_point on some of the docs (around  
20%) and according to the docs indexing lat\_lon does not work if there's  
more than one value for the field.

Is there any other approach that will get us there?

On Friday, April 13, 2012 5:08:55 AM UTC-7, kimchy wrote:

> Hi,
> 
> In order to execute the geo related filters, the values for them need  
> to be loaded to memory, you simply need to increase the memory allocated to  
> elasticsearch or start more nodes in the cluster.
> 
> On Wed, Apr 11, 2012 at 4:31 PM, luc3k2202 \<[luc3...@gmail.com](mailto:luc3...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hello, we are bulk indexing some geo\_points informations and thats is  
> > going ok. We encountering problem with this query to elastic:
> > 
> > { "query" : { "filtered" : { "filter" : { "geo\_distance" : { "coords" : [  
> > 53.441,  
> > 14.545  
> > ],  
> > "distance" : "2km",  
> > "distance\_type" : "arc"  
> > } },  
> > "query" : { "match\_all" : { } }  
> > } },  
> > "size" : 1  
> > }
> > 
> > We have that Error:  
> > [http://pastebin.com/raw.php?i=FeNbQMcx](http://pastebin.com/raw.php?i=FeNbQMcx)  
> > We are observing huge jump in heap memory (set to 1gb min/max). This is  
> > our settings (we are using clean elastic configuration becouse we cant  
> > change production configuration for testing):
> > 
> > transport.tcp.compress: true  
> > http.max\_content\_length: 1000mb  
> > jmx.create\_connector: true  
> > index.cache.field.type: soft
> > 
> > without index.cache.field.type we encounter the same problem.
> > 
> > Our \_status:  
> > [http://pastebin.com/raw.php?i=ewZdfdTN](http://pastebin.com/raw.php?i=ewZdfdTN)
> > 
> > Sorry, for my English.

--

---

<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:57am UTC](https://discuss.elastic.co/t/problem-with-geo-points-search-queries/7295/4 "2017-07-06T02:57:31Z")

</div>


