# Remove search type: query\_and\_fetch

**URL:** <https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752>\
**Category:** Elasticsearch\
**Created:** [November 2, 2011, 11:10pm UTC](https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752 "2011-11-02T23:10:45Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [November 2, 2011, 11:10pm UTC](https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752/1 "2011-11-02T23:10:45Z")

</div>

Heya,

```
I am working on some refactoring both in the facets area specifically

```

and in search in general. I an planning to remove the option to have a  
search\_type of query\_and\_fetch, since I find it less useful than I thought  
initially (you almost never want to use it). Ping if you still want it in,  
and why.

-shay.banon

---

<div class="post-metadata">

**Author:** ![Karussell1](https://avatars.discourse-cdn.com/v4/letter/k/50afbb/32.png) [@Karussell1](https://discuss.elastic.co/u/Karussell1)\
**Post date:** [November 3, 2011, 8:18am UTC](https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752/2 "2011-11-03T08:18:03Z")

</div>

Hi Shay,

isn't this search type the fastest when I expect only a few hits? E.g.  
when user id is the user name but the user document can also retrieved  
via twitter token.

What is the reason you want remove that? Is that regarding the facets  
problem in issue 1305?

Regards,  
Peter.

On 3 Nov., 00:10, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Heya,
> 
> ```
> I am working on some refactoring both in the facets area specifically
> 
> ```
> 
> and in search in general. I an planning to remove the option to have a  
> search\_type of query\_and\_fetch, since I find it less useful than I thought  
> initially (you almost never want to use it). Ping if you still want it in,  
> and why.
> 
> -shay.banon

---

<div class="post-metadata">

**Author:** ![frazer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frazer/32/2752_2.png) [@frazer](https://discuss.elastic.co/u/frazer)\
**Post date:** [November 3, 2011, 3:30pm UTC](https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752/3 "2011-11-03T15:30:48Z")

</div>

Hey Shay

Is the refactoring to improve performance?

On Nov 2, 7:10 pm, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> Heya,
> 
> ```
> I am working on some refactoring both in the facets area specifically
> 
> ```
> 
> and in search in general. I an planning to remove the option to have a  
> search\_type of query\_and\_fetch, since I find it less useful than I thought  
> initially (you almost never want to use it). Ping if you still want it in,  
> and why.
> 
> -shay.banon

---

<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:** [November 3, 2011, 5:11pm UTC](https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752/4 "2011-11-03T17:11:28Z")

</div>

On Thu, Nov 3, 2011 at 10:18 AM, Karussell [tableyourtime@googlemail.com](mailto:tableyourtime@googlemail.com)wrote:

> Hi Shay,
> 
> isn't this search type the fastest when I expect only a few hits? E.g.  
> when user id is the user name but the user document can also retrieved  
> via twitter token.

Yes, if the request goes to several shards, then it will be faster if there  
are "few" results, but not terribly faster.

> What is the reason you want remove that? Is that regarding the facets  
> problem in issue 1305?

Thats one of them (the issue), I want to improve the search execution to  
make it both simpler to maintain, as well as simpler to extend.

> Regards,  
> Peter.
> 
> On 3 Nov., 00:10, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > Heya,
> > 
> > ```
> > I am working on some refactoring both in the facets area specifically
> > 
> > ```
> > 
> > and in search in general. I an planning to remove the option to have a  
> > search\_type of query\_and\_fetch, since I find it less useful than I  
> > thought  
> > initially (you almost never want to use it). Ping if you still want it  
> > in,  
> > and why.
> > 
> > -shay.banon

---

<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, 3:49am UTC](https://discuss.elastic.co/t/remove-search-type-query-and-fetch/5752/5 "2017-07-06T03:49:55Z")

</div>

Closed on July 6, 2017, 3:49am UTC


