-
Notifications
You must be signed in to change notification settings - Fork 115
[DOCS] Add behavioral analytics and search application examples #3392
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3437e87
[DOCS] Edit search application summaries
lcawl 552c1d4
Add manage_search_application cluster privilege
lcawl 5a945c3
Merge branch 'main' into search-application
lcawl 1f2c3ca
Add example for get behavioral analytics collections
lcawl ba6f695
More
lcawl c6814ea
Add examples
lcawl 4795fc3
Update specification/search_application/get/SearchApplicationGetRespo…
lcawl 727073d
Update specification/search_application/get_behavioral_analytics/Beha…
lcawl 6a6327f
Update specification/search_application/list/SearchApplicationsListRe…
lcawl ef5c8c0
Merge branch 'main' into search-application
lcawl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
specification/search_application/get/SearchApplicationGetResponseExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # summary: search-application/apis/get-search-application.asciidoc:95 | ||
| description: A sucessful response from `GET _application/search_application/my-app/`. | ||
| # type: response | ||
| # response_code: '' | ||
| value: | ||
| "{\n \"name\": \"my-app\",\n \"indices\": [ \"index1\", \"index2\" ],\n \ | ||
| \ \"updated_at_millis\": 1682105622204,\n \"template\": {\n \"script\": {\n\ | ||
| \ \"source\": {\n \"query\": {\n \"query_string\": {\n \ | ||
| \ \"query\": \"{{query_string}}\",\n \"default_field\": \"{{default_field}}\"\ | ||
| \n }\n }\n },\n \"lang\": \"mustache\",\n \"options\"\ | ||
| : {\n \"content_type\": \"application/json;charset=utf-8\"\n },\n \ | ||
| \ \"params\": {\n \"query_string\": \"*\",\n \"default_field\"\ | ||
| : \"*\"\n }\n }\n }\n}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...n/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponseExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # summary: behavioral-analytics/apis/list-analytics-collection.asciidoc:112 | ||
| description: A successful response from `GET _application/analytics/my*` | ||
| # type: response | ||
| # response_code: '' | ||
lcawl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| value: | ||
| "{\n \"my_analytics_collection\": {\n \"event_data_stream\": {\n \ | ||
| \ \"name\": \"behavioral_analytics-events-my_analytics_collection\"\n \ | ||
| \ }\n },\n \"my_analytics_collection2\": {\n \"event_data_stream\": {\n \ | ||
| \ \"name\": \"behavioral_analytics-events-my_analytics_collection2\"\n \ | ||
| \ }\n }\n}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
specification/search_application/list/SearchApplicationsListResponseExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # summary: search-application/apis/list-search-applications.asciidoc:108 | ||
| description: A succesful response from `GET _application/search_application?from=0&size=3&q=app*` returns the first three search applications whose names start with `app`. | ||
| # type: response | ||
| # response_code: '' | ||
lcawl marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| value: | ||
| "{\n \"count\": 2,\n \"results\": [\n {\n \"name\": \"app-1\",\n\ | ||
| \ \"updated_at_millis\": 1690981129366\n },\n {\n \"name\": \"app-2\"\ | ||
| ,\n \"updated_at_millis\": 1691501823939\n }\n ]\n}" | ||
17 changes: 17 additions & 0 deletions
17
specification/search_application/put/SearchApplicationPutRequestExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # summary: search-application/apis/put-search-application.asciidoc:148 | ||
| # method_request: PUT _application/search_application/my-app | ||
| description: > | ||
| Run `PUT _application/search_application/my-app` to create or update a search application called `my-app`. When the dictionary parameter is specified, the search application search API will perform the following parameter validation: it accepts only the `query_string` and `default_field` parameters; it verifies that `query_string` and `default_field` are both strings; it accepts `default_field` only if it takes the values title or description. If the parameters are not valid, the search application search API will return an error. | ||
| # type: request | ||
| value: | ||
| "{\n \"indices\": [ \"index1\", \"index2\" ],\n \"template\": {\n \"script\"\ | ||
| : {\n \"source\": {\n \"query\": {\n \"query_string\": {\n\ | ||
| \ \"query\": \"{{query_string}}\",\n \"default_field\": \"\ | ||
| {{default_field}}\"\n }\n }\n },\n \"params\": {\n \ | ||
| \ \"query_string\": \"*\",\n \"default_field\": \"*\"\n }\n },\n\ | ||
| \ \"dictionary\": {\n \"properties\": {\n \"query_string\": {\n \ | ||
| \ \"type\": \"string\"\n },\n \"default_field\": {\n \ | ||
| \ \"type\": \"string\",\n \"enum\": [\n \"title\",\n \ | ||
| \ \"description\"\n ]\n },\n \"additionalProperties\"\ | ||
| : false\n },\n \"required\": [\n \"query_string\"\n ]\n \ | ||
| \ }\n }\n}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
specification/search_application/search/SearchApplicationsSearchRequestExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # summary: search-application/apis/search-application-search.asciidoc:125 | ||
| # method_request: POST _application/search_application/my-app/_search | ||
| description: Use `POST _application/search_application/my-app/_search` to run a search against a search application called `my-app` that uses a search template. | ||
| # type: request | ||
| value: | ||
| "{\n \"params\": {\n \"query_string\": \"my first query\",\n \"text_fields\"\ | ||
| : [\n {\"name\": \"title\", \"boost\": 5},\n {\"name\": \"description\"\ | ||
| , \"boost\": 1}\n ]\n }\n}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.