-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
title: "Refresh Request" | ||
--- | ||
|
||
This request refresh one or more Elasticsearch indices. |
There was a problem hiding this comment.
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")) | ||
``` | ||
|
||
|
There was a problem hiding this comment.
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") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this scaladoc.
val executorRefresh = | ||
Executor | ||
.execute( | ||
ElasticRequest | ||
.refresh(name = index) | ||
) |
There was a problem hiding this comment.
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?
@@ -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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 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. |
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put empty line here.
@@ -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" |
There was a problem hiding this comment.
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.
This PR resolves #262