# Get Request does not allow "\*" as a filter

**URL:** <https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724>\
**Category:** Elasticsearch\
**Created:** [February 16, 2012, 1:21am UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724 "2012-02-16T01:21:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 16, 2012, 1:21am UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/1 "2012-02-16T01:21:12Z")

</div>

Tested in version 0.18.2

Attempts to do a Get request with all ("\*") fields either via REST or  
the Java API does not work. Wildcard fields do work with search  
requests.

Requests are simple:

[http://localhost:9200/my\_index/my\_type/1001?fields=\*](http://localhost:9200/my_index/my_type/1001?fields=*)  
OR  
client.prepareGet().setIndex("my\_index").setType("my\_type").setId("1001").setFields("\*")

Have not traced through all the code, but appears that the issue might  
be in ShardGetService, where is tries to find the values for each  
field.

Cheers,

Ivan

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 16, 2012, 7:03am UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/2 "2012-02-16T07:03:07Z")

</div>

Was not able to previously look at the issue on Github since it was  
momentarily down. The issue occurs in 0.19.2RC2 as well. Not a major  
issue, just wanted to point it out.

> <https://gist.github.com/brusic/1842773>

Cheers,

Ivan

On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Tested in version 0.18.2
> 
> Attempts to do a Get request with all ("\*") fields either via REST or  
> the Java API does not work. Wildcard fields do work with search  
> requests.
> 
> Requests are simple:
> 
> [http://localhost:9200/my\_index/my\_type/1001?fields=](http://localhost:9200/my_index/my_type/1001?fields=)\*  
> OR  
> client.prepareGet().setIndex("my\_index").setType("my\_type").setId("1001").setFields("\*")
> 
> Have not traced through all the code, but appears that the issue might  
> be in ShardGetService, where is tries to find the values for each  
> field.
> 
> Cheers,
> 
> Ivan

---

<div class="post-metadata">

**Author:** ![yin\_weifeng](https://avatars.discourse-cdn.com/v4/letter/y/f4b2a3/32.png) [@yin\_weifeng](https://discuss.elastic.co/u/yin_weifeng)\
**Post date:** [February 16, 2012, 7:16am UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/3 "2012-02-16T07:16:14Z")

</div>

Thanks for the point and links, those're very helpful.

---

<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:** [February 16, 2012, 7:45pm UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/4 "2012-02-16T19:45:45Z")

</div>

Yes, it was never supported.

On Thursday, February 16, 2012 at 9:03 AM, Ivan Brusic wrote:

> Was not able to previously look at the issue on Github since it was  
> momentarily down. The issue occurs in 0.19.2RC2 as well. Not a major  
> issue, just wanted to point it out.
> 
> [gist:1842773 · GitHub](https://gist.github.com/1842773)
> 
> Cheers,
> 
> Ivan
> 
> On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic \<[ivan@brusic.com](mailto:ivan@brusic.com) ([mailto:ivan@brusic.com](mailto:ivan@brusic.com))\> wrote:
> 
> > Tested in version 0.18.2
> > 
> > Attempts to do a Get request with all ("\*") fields either via REST or  
> > the Java API does not work. Wildcard fields do work with search  
> > requests.
> > 
> > Requests are simple:
> > 
> > [http://localhost:9200/my\_index/my\_type/1001?fields=](http://localhost:9200/my_index/my_type/1001?fields=)\*  
> > OR  
> > client.prepareGet().setIndex("my\_index").setType("my\_type").setId("1001").setFields("\*")
> > 
> > Have not traced through all the code, but appears that the issue might  
> > be in ShardGetService, where is tries to find the values for each  
> > field.
> > 
> > Cheers,
> > 
> > Ivan

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 16, 2012, 9:51pm UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/5 "2012-02-16T21:51:03Z")

</div>

Got it. No wonder it was not working. 🙂

Not a big deal, was running some test code and was wondering why my  
code was not returning fields.

--  
Ivan

On Thu, Feb 16, 2012 at 11:45 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Yes, it was never supported.
> 
> On Thursday, February 16, 2012 at 9:03 AM, Ivan Brusic wrote:
> 
> Was not able to previously look at the issue on Github since it was  
> momentarily down. The issue occurs in 0.19.2RC2 as well. Not a major  
> issue, just wanted to point it out.
> 
> [gist:1842773 · GitHub](https://gist.github.com/1842773)
> 
> Cheers,
> 
> Ivan
> 
> On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> Tested in version 0.18.2
> 
> Attempts to do a Get request with all ("\*") fields either via REST or  
> the Java API does not work. Wildcard fields do work with search  
> requests.
> 
> Requests are simple:
> 
> [http://localhost:9200/my\_index/my\_type/1001?fields=](http://localhost:9200/my_index/my_type/1001?fields=)\*  
> OR  
> client.prepareGet().setIndex("my\_index").setType("my\_type").setId("1001").setFields("\*")
> 
> Have not traced through all the code, but appears that the issue might  
> be in ShardGetService, where is tries to find the values for each  
> field.
> 
> Cheers,
> 
> Ivan

---

<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:** [February 16, 2012, 10:27pm UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/6 "2012-02-16T22:27:55Z")

</div>

Yea… . I can add support for it, but then it will get tricky to have for real time get (which fields to return in case its coming from the transaction log and we have the \_source, not stored fields).

On Thursday, February 16, 2012 at 11:51 PM, Ivan Brusic wrote:

> Got it. No wonder it was not working. 🙂
> 
> Not a big deal, was running some test code and was wondering why my  
> code was not returning fields.
> 
> --  
> Ivan
> 
> On Thu, Feb 16, 2012 at 11:45 AM, Shay Banon \<[kimchy@gmail.com](mailto:kimchy@gmail.com) ([mailto:kimchy@gmail.com](mailto:kimchy@gmail.com))\> wrote:
> 
> > Yes, it was never supported.
> > 
> > On Thursday, February 16, 2012 at 9:03 AM, Ivan Brusic wrote:
> > 
> > Was not able to previously look at the issue on Github since it was  
> > momentarily down. The issue occurs in 0.19.2RC2 as well. Not a major  
> > issue, just wanted to point it out.
> > 
> > [gist:1842773 · GitHub](https://gist.github.com/1842773)
> > 
> > Cheers,
> > 
> > Ivan
> > 
> > On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic \<[ivan@brusic.com](mailto:ivan@brusic.com) ([mailto:ivan@brusic.com](mailto:ivan@brusic.com))\> wrote:
> > 
> > Tested in version 0.18.2
> > 
> > Attempts to do a Get request with all ("\*") fields either via REST or  
> > the Java API does not work. Wildcard fields do work with search  
> > requests.
> > 
> > Requests are simple:
> > 
> > [http://localhost:9200/my\_index/my\_type/1001?fields=](http://localhost:9200/my_index/my_type/1001?fields=)\*  
> > OR  
> > client.prepareGet().setIndex("my\_index").setType("my\_type").setId("1001").setFields("\*")
> > 
> > Have not traced through all the code, but appears that the issue might  
> > be in ShardGetService, where is tries to find the values for each  
> > field.
> > 
> > Cheers,
> > 
> > Ivan

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [February 16, 2012, 11:29pm UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/7 "2012-02-16T23:29:38Z")

</div>

I had figured as much judging from the code in ShardGetService.  
Support is not really needed for my purposes. I was running a few test  
queries against an index with disabled source, which means I was only  
able to see explicitly stated stored fields.

On Thu, Feb 16, 2012 at 2:27 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Yea… . I can add support for it, but then it will get tricky to have for  
> real time get (which fields to return in case its coming from the  
> transaction log and we have the \_source, not stored fields).
> 
> On Thursday, February 16, 2012 at 11:51 PM, Ivan Brusic wrote:
> 
> Got it. No wonder it was not working. 🙂
> 
> Not a big deal, was running some test code and was wondering why my  
> code was not returning fields.
> 
> --  
> Ivan
> 
> On Thu, Feb 16, 2012 at 11:45 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> Yes, it was never supported.
> 
> On Thursday, February 16, 2012 at 9:03 AM, Ivan Brusic wrote:
> 
> Was not able to previously look at the issue on Github since it was  
> momentarily down. The issue occurs in 0.19.2RC2 as well. Not a major  
> issue, just wanted to point it out.
> 
> [gist:1842773 · GitHub](https://gist.github.com/1842773)
> 
> Cheers,
> 
> Ivan
> 
> On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:
> 
> Tested in version 0.18.2
> 
> Attempts to do a Get request with all ("\*") fields either via REST or  
> the Java API does not work. Wildcard fields do work with search  
> requests.
> 
> Requests are simple:
> 
> [http://localhost:9200/my\_index/my\_type/1001?fields=](http://localhost:9200/my_index/my_type/1001?fields=)\*  
> OR  
> client.prepareGet().setIndex("my\_index").setType("my\_type").setId("1001").setFields("\*")
> 
> Have not traced through all the code, but appears that the issue might  
> be in ShardGetService, where is tries to find the values for each  
> field.
> 
> Cheers,
> 
> Ivan

---

<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:38am UTC](https://discuss.elastic.co/t/get-request-does-not-allow-as-a-filter/6724/8 "2017-07-06T03:38:59Z")

</div>


