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

(dsl): Support refresh request #300

Merged
merged 6 commits into from
Aug 15, 2023
Merged

Conversation

milicns
Copy link
Contributor

@milicns milicns commented Aug 14, 2023

This PR resolves #262

title: "Refresh Request"
---

This request refresh one or more Elasticsearch indices.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe: This request is used for refreshing ...?

val request: RefreshRequest = refresh(index = IndexName("index"))
```


Copy link
Collaborator

Choose a reason for hiding this comment

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

Omit one empty line.

equalTo(true)
)
},
test("return 'NotFound' if index does not exists") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
test("return 'NotFound' if index does not exists") {
test("return false if index does not exists") {

@@ -214,6 +214,17 @@ object ElasticRequest {
final def getById(index: IndexName, id: DocumentId): GetByIdRequest =
GetById(index = index, id = id, refresh = None, routing = None)

/**
* Constructs an instance of [[RefreshRequest]] used for deleting an index by specified name.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update this scaladoc.

Comment on lines 180 to 185
val executorRefresh =
Executor
.execute(
ElasticRequest
.refresh(name = index)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be in one line?

@milicns milicns requested a review from dbulaja98 August 14, 2023 11:59
@@ -215,7 +215,7 @@ object ElasticRequest {
GetById(index = index, id = id, refresh = None, routing = None)

/**
* Constructs an instance of [[RefreshRequest]] used for deleting an index by specified name.
* Constructs an instance of [[RefreshRequest]] used for refreshing an index by specified name.
Copy link
Collaborator

@dbulaja98 dbulaja98 Aug 14, 2023

Choose a reason for hiding this comment

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

Suggested change
* Constructs an instance of [[RefreshRequest]] used for refreshing an index by specified name.
* Constructs an instance of [[RefreshRequest]] used for refreshing an index with the specified name.

@dbulaja98 dbulaja98 requested review from petarcurcin and removed request for petarcurcin August 14, 2023 13:42
@milicns milicns requested a review from dbulaja98 August 14, 2023 15:10
val request: RefreshRequest = refresh(index = IndexName("index"))
```

You can find more information about `Refresh` request [here](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/indices-refresh.html).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Put empty line here.

@milicns milicns requested a review from dbulaja98 August 15, 2023 10:52
@@ -648,6 +658,7 @@ private[elasticsearch] object HttpExecutor {
private final val PointInTime = "_pit"
private final val Scroll = "scroll"
private final val ScrollId = "scroll_id"
private final val Refresh = "_refresh"
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this in right order.

@dbulaja98 dbulaja98 merged commit 14dd5f9 into lambdaworks:main Aug 15, 2023
13 checks passed
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.

Add support for refresh API
3 participants