Skip to content

[Doc] Update "Java API Administration >> Indices Administration" page #31906

@lockwobr

Description

@lockwobr

This example in the Java API Administration docs does not work correctly and is very miss leading.

Example reads:

client.admin().indices().prepareCreate("twitter")   
        .addMapping("\"tweet\": {\n" +              
                "  \"properties\": {\n" +
                "    \"message\": {\n" +
                "      \"type\": \"text\"\n" +
                "    }\n" +
                "  }\n" +
                "}")
        .get();

This example works, but it does not create the index correctly it seems, the example should read

client.admin.indices().prepareCreate("twitter")
         .addMapping("tweet", "message", "type=text").get();

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions