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

(api): Support creating index #9

Merged
merged 5 commits into from
Nov 30, 2022
Merged

Conversation

markaya
Copy link
Contributor

@markaya markaya commented Nov 29, 2022

No description provided.

@@ -47,6 +47,11 @@ object ElasticRequest {
): ElasticRequest[Unit] =
CreateOrUpdate(index, id, Document.from(doc), routing)

def createIndex(
name: IndexName,
jsonBody: Option[String]
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this one...

I would definitely rename it to definition. @arnoldlacko

Also, should we use Json or String? 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or maybe settings/configuration?

request
.put(uri"$basePath/${createIndex.name}")
.contentType(ApplicationJson)
.body(createIndex.jsonBody.getOrElse(""))
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same behavior as creating it without body at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

@markaya markaya force-pushed the executor-add-create-index branch from 63d5724 to 2a501c1 Compare November 29, 2022 12:49
@drmarjanovic drmarjanovic force-pushed the executor-add-create-index branch from 49d5b31 to 2520e00 Compare November 30, 2022 18:20
@drmarjanovic drmarjanovic changed the title (executor): Support creating index (api): Support creating index Nov 30, 2022
@drmarjanovic drmarjanovic merged commit a4e2478 into main Nov 30, 2022
@drmarjanovic drmarjanovic deleted the executor-add-create-index branch November 30, 2022 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants