Get Request does not allow "*" as a filter

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=*
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

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.

Cheers,

Ivan

On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic 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=*
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

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

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

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=*
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

Got it. No wonder it was not working. :slight_smile:

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 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

Cheers,

Ivan

On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic 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=*
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

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. :slight_smile:

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

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=*
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

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 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. :slight_smile:

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 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

Cheers,

Ivan

On Wed, Feb 15, 2012 at 5:21 PM, Ivan Brusic 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=*
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