# Search local only

**URL:** <https://discuss.elastic.co/t/search-local-only/23422>\
**Category:** Elasticsearch\
**Created:** [April 27, 2015, 3:14pm UTC](https://discuss.elastic.co/t/search-local-only/23422 "2015-04-27T15:14:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christophe\_Rosko](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@Christophe\_Rosko](https://discuss.elastic.co/u/Christophe_Rosko)\
**Post date:** [April 27, 2015, 3:14pm UTC](https://discuss.elastic.co/t/search-local-only/23422/1 "2015-04-27T15:14:31Z")

</div>

Hi !

I have currently a cluster with one shard on multiple nodes, using the  
option 'auto\_expand\_replicas' =\> '0-all', so that every node has all the  
data.  
Some nodes are in Europe and some are in America.

When I'm requesting a server in Europe, I notice in the logs that  
sometimes, the request is send to a server in America, which makes the  
request longer.  
Is there a way to keep replications between severs and to force  
elasticsearch to search only locally ?

Thanks for your help !

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c85b6404-77e1-4f1e-b132-a5756bba869f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c85b6404-77e1-4f1e-b132-a5756bba869f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 27, 2015, 3:34pm UTC](https://discuss.elastic.co/t/search-local-only/23422/2 "2015-04-27T15:34:02Z")

</div>

Have a look at [Request body search | Elasticsearch Guide [8.11] | Elastic](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html) [http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html)  
Might help.

That said we don’t recommend splitting your cluster on 2 data centers.

--  
David Pilato - Developer | Evangelist

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co/)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 27 avr. 2015 à 17:14, Christophe Rosko [christophe@digiteka.com](mailto:christophe@digiteka.com) a écrit :
> 
> Hi !
> 
> I have currently a cluster with one shard on multiple nodes, using the option 'auto\_expand\_replicas' =\> '0-all', so that every node has all the data.  
> Some nodes are in Europe and some are in America.
> 
> When I'm requesting a server in Europe, I notice in the logs that sometimes, the request is send to a server in America, which makes the request longer.  
> Is there a way to keep replications between severs and to force elasticsearch to search only locally ?
> 
> Thanks for your help !
> 
> --  
> 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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c85b6404-77e1-4f1e-b132-a5756bba869f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c85b6404-77e1-4f1e-b132-a5756bba869f%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/c85b6404-77e1-4f1e-b132-a5756bba869f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/c85b6404-77e1-4f1e-b132-a5756bba869f%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/1F102723-28F1-41E0-9AD5-8B8DE6C0220E%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/1F102723-28F1-41E0-9AD5-8B8DE6C0220E%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:17am UTC](https://discuss.elastic.co/t/search-local-only/23422/3 "2017-07-06T00:17:34Z")

</div>


