# What is the correct \_primary\_first syntax? What is the relevant debug logger?

**URL:** <https://discuss.elastic.co/t/what-is-the-correct--primary-first-syntax-what-is-the-relevant-debug-logger/23407>\
**Category:** Elasticsearch\
**Created:** [April 27, 2015, 5:53am UTC](https://discuss.elastic.co/t/what-is-the-correct--primary-first-syntax-what-is-the-relevant-debug-logger/23407 "2015-04-27T05:53:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Itai\_Frenkel](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Itai\_Frenkel](https://discuss.elastic.co/u/Itai_Frenkel)\
**Post date:** [April 27, 2015, 5:53am UTC](https://discuss.elastic.co/t/what-is-the-correct--primary-first-syntax-what-is-the-relevant-debug-logger/23407/1 "2015-04-27T05:53:16Z")

</div>

Hello,

What is the correct syntax of using \_primary\_first in search and search  
template queries?

GET myindex/\_search/template?preference=\_primary\_first

or

GET myindex/\_search/template?routing=\_primary\_first

Is there any verbose mode that can log the list of shards that were  
actually accessed?

thanks,  
Itai

--  
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/6f6d44a0-f689-4168-85cf-574610f73155%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6f6d44a0-f689-4168-85cf-574610f73155%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Itamar\_Syn\_Hershko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/itamar_syn_hershko/32/725_2.png) [@Itamar\_Syn\_Hershko](https://discuss.elastic.co/u/Itamar_Syn_Hershko)\
**Post date:** [April 28, 2015, 12:59pm UTC](https://discuss.elastic.co/t/what-is-the-correct--primary-first-syntax-what-is-the-relevant-debug-logger/23407/2 "2015-04-28T12:59:27Z")

</div>

?preference=\_primary\_first

see

> **[Request body search | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-preference)**

No verbose mode at the moment

--

Itamar Syn-Hershko  
[http://code972.com](http://code972.com) | @synhershko [https://twitter.com/synhershko](https://twitter.com/synhershko)  
Freelance Developer & Consultant  
[Lucene.NET](http://Lucene.NET) committer and PMC member

On Mon, Apr 27, 2015 at 8:53 AM, Itai Frenkel [itaifrenkel@live.com](mailto:itaifrenkel@live.com) wrote:

> Hello,
> 
> What is the correct syntax of using \_primary\_first in search and search  
> template queries?
> 
> GET myindex/\_search/template?preference=\_primary\_first
> 
> or
> 
> GET myindex/\_search/template?routing=\_primary\_first
> 
> Is there any verbose mode that can log the list of shards that were  
> actually accessed?
> 
> thanks,  
> Itai
> 
> --  
> 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/6f6d44a0-f689-4168-85cf-574610f73155%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6f6d44a0-f689-4168-85cf-574610f73155%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/6f6d44a0-f689-4168-85cf-574610f73155%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/6f6d44a0-f689-4168-85cf-574610f73155%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [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/CAHTr4ZsgOPJqY2dB1A\_jytn5EwxoJo5Lkjp9BMWr%3DFHT9o-b3g%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAHTr4ZsgOPJqY2dB1A_jytn5EwxoJo5Lkjp9BMWr%3DFHT9o-b3g%40mail.gmail.com).  
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/what-is-the-correct--primary-first-syntax-what-is-the-relevant-debug-logger/23407/3 "2017-07-06T00:17:26Z")

</div>


