Skip to content

Java API: Simplify Java API #199

@kimchy

Description

@kimchy

Add simplified execution model for all APIs that require less imports, more concise and simpler to use. For example:

IndexResponse indexResponse = client1.prepareIndex()
    .setIndex("test")
    .setType("type1")
    .setId("1")
    .setSource(source("1", "test"))
    .execute().actionGet();

SearchResponse searchResponse = client.prepareSearch()
        .setIndices("test")
        .setSearchType(QUERY_THEN_FETCH)
        .setQuery(termQuery("_all", "test"))
        .setFrom(0).setSize(60)
        .addHighlightedField("_all").setHighlighterOrder("score").setHighlighterPreTags("<xxx>").setHighlighterPostTags("</xxx>")
        .setScroll(timeValueMinutes(10))
        .execute().actionGet();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions