Skip to content

CreateIndex should return an Index instance #38

Closed
@eskombro

Description

@eskombro

In the current implementation, getIndex() returns an Index instance, but createIndex() returns the response of the POST request for creating an index. This forces a usage that looks like this:

...
String i = ms.createIndex(indexUid);
Index index = ms.getIndex(indexUid);
index.addDocuments(...)
...

In case createIndex succeeds, it should return an Index instance which simplifies the usage to

...
Index index = ms.createIndex(indexUid);
index.addDocuments(...)
...

In case of error, this will be handled by #7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions