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

Projects
None yet
4 participants
@brwe
Copy link
Contributor

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.

@brwe brwe added review labels Jul 18, 2014

@dadoonet

View changes

src/test/java/org/elasticsearch/get/GetActionTests.java Outdated
@@ -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")

This comment has been minimized.

Copy link
@dadoonet

dadoonet Jul 18, 2014

Member

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

@dadoonet

View changes

src/test/java/org/elasticsearch/get/GetActionTests.java Outdated
.endObject()
.endObject())
.get();
client().prepareIndex("my-index", "my-type1", "1")

This comment has been minimized.

Copy link
@dadoonet

dadoonet Jul 18, 2014

Member

You could use

index("my-index", "my-type1", "1", "some_field", "some text");
@dadoonet

This comment has been minimized.

Copy link
Member

commented Jul 18, 2014

Left small comments. LGTM.

brwe added some commits Jul 18, 2014

Make _all field accessible with GET
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

Make _all field accessible with GET
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 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
You can’t perform that action at this time.