Skip to content

Commit

Permalink
[eclipse-ditto#914] document "search-persisted".
Browse files Browse the repository at this point in the history
Signed-off-by: Yufei Cai <yufei.cai@bosch.io>
  • Loading branch information
yufei-cai committed Dec 13, 2020
1 parent 35856a6 commit 3969c60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -47,6 +47,9 @@ It is ignored for commands in the live channel.
* **live-response**: For acknowledgement requests of live commands and live messages.
It is fulfilled when a subscriber of the live command or message sends a corresponding response.
It is ignored for commands in the twin channel.
* **search-persisted**: For acknowledgement requests of twin modifying commands.
It is fulfilled when a modifying command has successfully updated the search index of the digital twin.
It is ignored for commands in the live channel.

### Custom acknowledgement labels
In addition to the [built-in](#built-in-acknowledgement-labels) acknowledgement requests,
Expand Down
4 changes: 4 additions & 0 deletions documentation/src/main/resources/pages/ditto/basic-search.md
Expand Up @@ -35,6 +35,10 @@ That means that when a thing is updated and the API (e.g. the HTTP endpoint) ret
will not reflect that change in that instant. The change will most likely be reflected in the search index within
1-2 seconds. In rare cases the duration until consistency is reached again might be higher.

If it is important to know when a twin modification is reflected in the search index, request the
[built-in acknowledgement](#built-in-acknowledgement-labels) `search-persisted` in the corresponding command.
Search index update is successful if the status code of `search-persisted` in the command response is 204 "no content".
Status codes at or above 400 indicate failed search index update due to client or server errors.

## Search queries

Expand Down

0 comments on commit 3969c60

Please sign in to comment.