# Attributes of SearchRequest

**URL:** <https://discuss.elastic.co/t/attributes-of-searchrequest/11411>\
**Category:** Elasticsearch\
**Created:** [April 2, 2013, 5:22am UTC](https://discuss.elastic.co/t/attributes-of-searchrequest/11411 "2013-04-02T05:22:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [April 2, 2013, 5:22am UTC](https://discuss.elastic.co/t/attributes-of-searchrequest/11411/1 "2013-04-02T05:22:58Z")

</div>

Can someone tell me the usage of these searchrequest attributes

queryHint

extraSource

--  
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:** [April 2, 2013, 8:07am UTC](https://discuss.elastic.co/t/attributes-of-searchrequest/11411/2 "2013-04-02T08:07:34Z")

</div>

Hey there,

the extraSource is used as an additional input for a query. For example an  
HTTP request contains of a request body (which defines the search request  
and is used as source), but also of some parameters in the URL parameters,  
which are then defined as extra source. If you want to check the source,  
check out RestSearchAction. The extra source is 'merged' with the original  
source before querying.

Where have you spotted the query hint? I am not sure which one you mean.  
There is a search\_query\_hint in the more liks this feature, but I guess you  
are asking for something else...

--Alex

On Tue, Apr 2, 2013 at 7:22 AM, Chetana [ambha.career@gmail.com](mailto:ambha.career@gmail.com) wrote:

> Can someone tell me the usage of these searchrequest attributes
> 
> queryHint
> 
> extraSource
> 
> --  
> 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:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [April 2, 2013, 11:45am UTC](https://discuss.elastic.co/t/attributes-of-searchrequest/11411/3 "2013-04-02T11:45:13Z")

</div>

queryHint was the old name of the 'preference' parameter in  
SearchRequest. It can be set to control the access to the shards.  
Default is random access, other values are 'local' for accessing local  
shards first, or 'primary' to access primary shards only, or a custom value.

Also, queryHint was an unused parameter in the count action of 0.20,  
which has been removed in 0.90. I assume it was intended with the same  
semantics as in SearchRequest.

Jörg

Am 02.04.2013 10:07, schrieb Alexander Reelsen:

> Where have you spotted the query hint? I am not sure which one you  
> mean. There is a search\_query\_hint in the more liks this feature, but  
> I guess you are asking for something else...

--  
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:43am UTC](https://discuss.elastic.co/t/attributes-of-searchrequest/11411/4 "2017-07-06T02:43:15Z")

</div>

Closed on July 6, 2017, 2:43am UTC


