Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow GET access to _all field (return value was always null before) #6924

Closed
wants to merge 2 commits into from

Conversation

brwe
Copy link
Contributor

@brwe brwe commented Jul 18, 2014

GET only returned null even when stored if requested with GET like this:

curl -XGET "http://localhost:9200/test/test/1?fields=_all"

Instead, it should simply behave like a String field and return the concatenated fields as String.

@@ -885,4 +885,30 @@ public void testGetFields_complexField() throws Exception {
assertThat(getResponse.getField(field).getValues().get(1).toString(), equalTo("value2"));
}

@Test
public void testGet_allField() throws Exception {
client().admin().indices().prepareCreate("my-index")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use prepareCreate("my-index") instead of client().admin().indices().prepareCreate("my-index")

@dadoonet
Copy link
Member

Left small comments. LGTM.

brwe added 2 commits July 23, 2014 09:11
GET only returned null even when stored if requested with GET like this:

`curl -XGET "http://localhost:9200/test/test/1?fields=_all"`

Instead, it should simply behave like a String field and return the
concatenated fields as String.
brwe added a commit that referenced this pull request Jul 23, 2014
GET only returned null even when stored if requested with GET like this:

`curl -XGET "http://localhost:9200/test/test/1?fields=_all"`

Instead, it should simply behave like a String field and return the
concatenated fields as String.

closes #6924
@brwe brwe closed this in 734e656 Jul 23, 2014
@brwe brwe changed the title Make _all field accessible with GET Get API: Allow GET access to _all field (return value was always null before) Jul 23, 2014
@jpountz jpountz removed the review label Jul 24, 2014
@clintongormley clintongormley added the :Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. label Jun 7, 2015
@clintongormley clintongormley changed the title Get API: Allow GET access to _all field (return value was always null before) Allow GET access to _all field (return value was always null before) Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Indexing/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >enhancement v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants