holmesgpt 0.13.2__py3-none-any.whl → 0.16.2a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. holmes/__init__.py +1 -1
  2. holmes/clients/robusta_client.py +17 -4
  3. holmes/common/env_vars.py +40 -1
  4. holmes/config.py +114 -144
  5. holmes/core/conversations.py +53 -14
  6. holmes/core/feedback.py +191 -0
  7. holmes/core/investigation.py +18 -22
  8. holmes/core/llm.py +489 -88
  9. holmes/core/models.py +103 -1
  10. holmes/core/openai_formatting.py +13 -0
  11. holmes/core/prompt.py +1 -1
  12. holmes/core/safeguards.py +4 -4
  13. holmes/core/supabase_dal.py +293 -100
  14. holmes/core/tool_calling_llm.py +423 -323
  15. holmes/core/tools.py +311 -33
  16. holmes/core/tools_utils/token_counting.py +14 -0
  17. holmes/core/tools_utils/tool_context_window_limiter.py +57 -0
  18. holmes/core/tools_utils/tool_executor.py +13 -8
  19. holmes/core/toolset_manager.py +155 -4
  20. holmes/core/tracing.py +6 -1
  21. holmes/core/transformers/__init__.py +23 -0
  22. holmes/core/transformers/base.py +62 -0
  23. holmes/core/transformers/llm_summarize.py +174 -0
  24. holmes/core/transformers/registry.py +122 -0
  25. holmes/core/transformers/transformer.py +31 -0
  26. holmes/core/truncation/compaction.py +59 -0
  27. holmes/core/truncation/dal_truncation_utils.py +23 -0
  28. holmes/core/truncation/input_context_window_limiter.py +218 -0
  29. holmes/interactive.py +177 -24
  30. holmes/main.py +7 -4
  31. holmes/plugins/prompts/_fetch_logs.jinja2 +26 -1
  32. holmes/plugins/prompts/_general_instructions.jinja2 +1 -2
  33. holmes/plugins/prompts/_runbook_instructions.jinja2 +23 -12
  34. holmes/plugins/prompts/conversation_history_compaction.jinja2 +88 -0
  35. holmes/plugins/prompts/generic_ask.jinja2 +2 -4
  36. holmes/plugins/prompts/generic_ask_conversation.jinja2 +2 -1
  37. holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2 +2 -1
  38. holmes/plugins/prompts/generic_investigation.jinja2 +2 -1
  39. holmes/plugins/prompts/investigation_procedure.jinja2 +48 -0
  40. holmes/plugins/prompts/kubernetes_workload_ask.jinja2 +2 -1
  41. holmes/plugins/prompts/kubernetes_workload_chat.jinja2 +2 -1
  42. holmes/plugins/runbooks/__init__.py +117 -18
  43. holmes/plugins/runbooks/catalog.json +2 -0
  44. holmes/plugins/toolsets/__init__.py +21 -8
  45. holmes/plugins/toolsets/aks-node-health.yaml +46 -0
  46. holmes/plugins/toolsets/aks.yaml +64 -0
  47. holmes/plugins/toolsets/atlas_mongodb/mongodb_atlas.py +26 -36
  48. holmes/plugins/toolsets/azure_sql/azure_sql_toolset.py +0 -1
  49. holmes/plugins/toolsets/azure_sql/tools/analyze_connection_failures.py +10 -7
  50. holmes/plugins/toolsets/azure_sql/tools/analyze_database_connections.py +9 -6
  51. holmes/plugins/toolsets/azure_sql/tools/analyze_database_health_status.py +8 -6
  52. holmes/plugins/toolsets/azure_sql/tools/analyze_database_performance.py +8 -6
  53. holmes/plugins/toolsets/azure_sql/tools/analyze_database_storage.py +9 -6
  54. holmes/plugins/toolsets/azure_sql/tools/get_active_alerts.py +9 -7
  55. holmes/plugins/toolsets/azure_sql/tools/get_slow_queries.py +9 -6
  56. holmes/plugins/toolsets/azure_sql/tools/get_top_cpu_queries.py +9 -6
  57. holmes/plugins/toolsets/azure_sql/tools/get_top_data_io_queries.py +9 -6
  58. holmes/plugins/toolsets/azure_sql/tools/get_top_log_io_queries.py +9 -6
  59. holmes/plugins/toolsets/bash/bash_toolset.py +10 -13
  60. holmes/plugins/toolsets/bash/common/bash.py +7 -7
  61. holmes/plugins/toolsets/cilium.yaml +284 -0
  62. holmes/plugins/toolsets/coralogix/toolset_coralogix_logs.py +5 -3
  63. holmes/plugins/toolsets/datadog/datadog_api.py +490 -24
  64. holmes/plugins/toolsets/datadog/datadog_logs_instructions.jinja2 +21 -10
  65. holmes/plugins/toolsets/datadog/toolset_datadog_general.py +349 -216
  66. holmes/plugins/toolsets/datadog/toolset_datadog_logs.py +190 -19
  67. holmes/plugins/toolsets/datadog/toolset_datadog_metrics.py +101 -44
  68. holmes/plugins/toolsets/datadog/toolset_datadog_rds.py +13 -16
  69. holmes/plugins/toolsets/datadog/toolset_datadog_traces.py +25 -31
  70. holmes/plugins/toolsets/git.py +51 -46
  71. holmes/plugins/toolsets/grafana/common.py +15 -3
  72. holmes/plugins/toolsets/grafana/grafana_api.py +46 -24
  73. holmes/plugins/toolsets/grafana/grafana_tempo_api.py +454 -0
  74. holmes/plugins/toolsets/grafana/loki/instructions.jinja2 +9 -0
  75. holmes/plugins/toolsets/grafana/loki/toolset_grafana_loki.py +117 -0
  76. holmes/plugins/toolsets/grafana/toolset_grafana.py +211 -91
  77. holmes/plugins/toolsets/grafana/toolset_grafana_dashboard.jinja2 +27 -0
  78. holmes/plugins/toolsets/grafana/toolset_grafana_tempo.jinja2 +246 -11
  79. holmes/plugins/toolsets/grafana/toolset_grafana_tempo.py +653 -293
  80. holmes/plugins/toolsets/grafana/trace_parser.py +1 -1
  81. holmes/plugins/toolsets/internet/internet.py +6 -7
  82. holmes/plugins/toolsets/internet/notion.py +5 -6
  83. holmes/plugins/toolsets/investigator/core_investigation.py +42 -34
  84. holmes/plugins/toolsets/kafka.py +25 -36
  85. holmes/plugins/toolsets/kubernetes.yaml +58 -84
  86. holmes/plugins/toolsets/kubernetes_logs.py +6 -6
  87. holmes/plugins/toolsets/kubernetes_logs.yaml +32 -0
  88. holmes/plugins/toolsets/logging_utils/logging_api.py +80 -4
  89. holmes/plugins/toolsets/mcp/toolset_mcp.py +181 -55
  90. holmes/plugins/toolsets/newrelic/__init__.py +0 -0
  91. holmes/plugins/toolsets/newrelic/new_relic_api.py +125 -0
  92. holmes/plugins/toolsets/newrelic/newrelic.jinja2 +41 -0
  93. holmes/plugins/toolsets/newrelic/newrelic.py +163 -0
  94. holmes/plugins/toolsets/opensearch/opensearch.py +10 -17
  95. holmes/plugins/toolsets/opensearch/opensearch_logs.py +7 -7
  96. holmes/plugins/toolsets/opensearch/opensearch_ppl_query_docs.jinja2 +1616 -0
  97. holmes/plugins/toolsets/opensearch/opensearch_query_assist.py +78 -0
  98. holmes/plugins/toolsets/opensearch/opensearch_query_assist_instructions.jinja2 +223 -0
  99. holmes/plugins/toolsets/opensearch/opensearch_traces.py +13 -16
  100. holmes/plugins/toolsets/openshift.yaml +283 -0
  101. holmes/plugins/toolsets/prometheus/prometheus.py +915 -390
  102. holmes/plugins/toolsets/prometheus/prometheus_instructions.jinja2 +43 -2
  103. holmes/plugins/toolsets/prometheus/utils.py +28 -0
  104. holmes/plugins/toolsets/rabbitmq/toolset_rabbitmq.py +9 -10
  105. holmes/plugins/toolsets/robusta/robusta.py +236 -65
  106. holmes/plugins/toolsets/robusta/robusta_instructions.jinja2 +26 -9
  107. holmes/plugins/toolsets/runbook/runbook_fetcher.py +137 -26
  108. holmes/plugins/toolsets/service_discovery.py +1 -1
  109. holmes/plugins/toolsets/servicenow_tables/instructions.jinja2 +83 -0
  110. holmes/plugins/toolsets/servicenow_tables/servicenow_tables.py +426 -0
  111. holmes/plugins/toolsets/utils.py +88 -0
  112. holmes/utils/config_utils.py +91 -0
  113. holmes/utils/default_toolset_installation_guide.jinja2 +1 -22
  114. holmes/utils/env.py +7 -0
  115. holmes/utils/global_instructions.py +75 -10
  116. holmes/utils/holmes_status.py +2 -1
  117. holmes/utils/holmes_sync_toolsets.py +0 -2
  118. holmes/utils/krr_utils.py +188 -0
  119. holmes/utils/sentry_helper.py +41 -0
  120. holmes/utils/stream.py +61 -7
  121. holmes/version.py +34 -14
  122. holmesgpt-0.16.2a0.dist-info/LICENSE +178 -0
  123. {holmesgpt-0.13.2.dist-info → holmesgpt-0.16.2a0.dist-info}/METADATA +29 -27
  124. {holmesgpt-0.13.2.dist-info → holmesgpt-0.16.2a0.dist-info}/RECORD +126 -102
  125. holmes/core/performance_timing.py +0 -72
  126. holmes/plugins/toolsets/grafana/tempo_api.py +0 -124
  127. holmes/plugins/toolsets/grafana/toolset_grafana_loki.py +0 -110
  128. holmes/plugins/toolsets/newrelic.py +0 -231
  129. holmes/plugins/toolsets/servicenow/install.md +0 -37
  130. holmes/plugins/toolsets/servicenow/instructions.jinja2 +0 -3
  131. holmes/plugins/toolsets/servicenow/servicenow.py +0 -219
  132. holmesgpt-0.13.2.dist-info/LICENSE.txt +0 -21
  133. {holmesgpt-0.13.2.dist-info → holmesgpt-0.16.2a0.dist-info}/WHEEL +0 -0
  134. {holmesgpt-0.13.2.dist-info → holmesgpt-0.16.2a0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,1616 @@
1
+ ================
2
+ CODE SNIPPETS
3
+ ================
4
+ TITLE: PPL Example: Get All Documents
5
+ DESCRIPTION: Shows a simple PPL query to retrieve all documents from the 'accounts' index by specifying it as the source.
6
+
7
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/syntax
8
+
9
+ LANGUAGE: PPL
10
+ CODE:
11
+ ```
12
+ search source=accounts;
13
+ ```
14
+
15
+ --------------------------------
16
+
17
+ TITLE: PPL Example: Filter Documents by Condition
18
+ DESCRIPTION: Illustrates a PPL query to retrieve documents from the 'accounts' index where either 'account_number' is 1 or 'gender' is 'F'.
19
+
20
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/syntax
21
+
22
+ LANGUAGE: PPL
23
+ CODE:
24
+ ```
25
+ search source=accounts account_number=1 or gender="F";
26
+ ```
27
+
28
+ --------------------------------
29
+
30
+ TITLE: PPL Query Syntax
31
+ DESCRIPTION: Demonstrates the basic syntax for Piped Processing Language (PPL) queries in OpenSearch. PPL uses a pipe operator to chain commands for data processing and analysis, particularly suited for observability data.
32
+
33
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/index
34
+
35
+ LANGUAGE: PPL
36
+ CODE:
37
+ ```
38
+ search source=<index-name> | <command_1> | <command_2> | ... | <command_n>
39
+ ```
40
+
41
+ --------------------------------
42
+
43
+ TITLE: Execute PPL Query
44
+ DESCRIPTION: This snippet demonstrates a basic PPL query to select specific fields ('firstname', 'lastname') from a data source ('accounts').
45
+
46
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/cli
47
+
48
+ LANGUAGE: ppl
49
+ CODE:
50
+ ```
51
+ source=accounts | fields firstname, lastname
52
+ ```
53
+
54
+ --------------------------------
55
+
56
+ TITLE: OpenSearch PPL Query Example
57
+ DESCRIPTION: An example of a Piped Processing Language (PPL) query used in OpenSearch Observability to count host addresses. This query demonstrates basic PPL syntax for data aggregation.
58
+
59
+ SOURCE: https://docs.opensearch.org/latest/observing-your-data/event-analytics
60
+
61
+ LANGUAGE: PPL
62
+ CODE:
63
+ ```
64
+ source = opensearch_dashboards_sample_data_logs | fields host | stats count()
65
+ ```
66
+
67
+ --------------------------------
68
+
69
+ TITLE: Update PPL Settings via _plugins/_query
70
+ DESCRIPTION: Illustrates how to update PPL plugin settings using the `_plugins/_query/settings` endpoint. This allows for transient configuration of PPL features.
71
+
72
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/settings
73
+
74
+ LANGUAGE: json
75
+ CODE:
76
+ ```
77
+ PUT _plugins/_query/settings{"transient":{"plugins":{"ppl":{"enabled":"false"}}}}
78
+ ```
79
+
80
+ --------------------------------
81
+
82
+ TITLE: Run CLI with PPL
83
+ DESCRIPTION: This snippet shows how to initiate the OpenSearch CLI with the Piped Processing Language (PPL) enabled. It specifies the query language using the '-l ppl' flag.
84
+
85
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/cli
86
+
87
+ LANGUAGE: bash
88
+ CODE:
89
+ ```
90
+ opensearchsql -l ppl <params>
91
+ ```
92
+
93
+ --------------------------------
94
+
95
+ TITLE: OpenSearch PPL Syntax and Commands
96
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
97
+
98
+ SOURCE: https://docs.opensearch.org/latest/vector-search/optimizing-storage/knn-vector-quantization
99
+
100
+ LANGUAGE: OpenSearch PPL
101
+ CODE:
102
+ ```
103
+ source=my_index | where field1 > 10 | fields field1, field2
104
+ ```
105
+
106
+ --------------------------------
107
+
108
+ TITLE: PPL Example: Search Accounts Index
109
+ DESCRIPTION: Demonstrates a PPL query to search the 'accounts' index, filter documents where age is greater than 18, and select specific fields (firstname, lastname).
110
+
111
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/syntax
112
+
113
+ LANGUAGE: PPL
114
+ CODE:
115
+ ```
116
+ search source=accounts
117
+ | where age > 18
118
+ | fields firstname, lastname
119
+ ```
120
+
121
+ --------------------------------
122
+
123
+ TITLE: OpenSearch PPL Syntax and Commands
124
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
125
+
126
+ SOURCE: https://docs.opensearch.org/latest/vector-search/vector-search-techniques/knn-score-script
127
+
128
+ LANGUAGE: OpenSearch PPL
129
+ CODE:
130
+ ```
131
+ source=my_index | where field1 > 10 | fields field1, field2
132
+ ```
133
+
134
+ --------------------------------
135
+
136
+ TITLE: OpenSearch PPL Syntax and Commands
137
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
138
+
139
+ SOURCE: https://docs.opensearch.org/latest/vector-search/performance-tuning-search
140
+
141
+ LANGUAGE: OpenSearch PPL
142
+ CODE:
143
+ ```
144
+ source=my_index | where field1 > 10 | fields field1, field2
145
+ ```
146
+
147
+ --------------------------------
148
+
149
+ TITLE: OpenSearch PPL Syntax and Commands
150
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
151
+
152
+ SOURCE: https://docs.opensearch.org/latest/vector-search/vector-search-techniques/approximate-knn
153
+
154
+ LANGUAGE: OpenSearch PPL
155
+ CODE:
156
+ ```
157
+ source=my_index | where field1 > 10 | fields field1, field2
158
+ ```
159
+
160
+ --------------------------------
161
+
162
+ TITLE: OpenSearch PPL Syntax and Commands
163
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
164
+
165
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/segment-replication/backpressure
166
+
167
+ LANGUAGE: OpenSearch PPL
168
+ CODE:
169
+ ```
170
+ source=my_index | where field1 > 10 | fields field1, field2
171
+ ```
172
+
173
+ --------------------------------
174
+
175
+ TITLE: OpenSearch PPL Syntax and Commands
176
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
177
+
178
+ SOURCE: https://docs.opensearch.org/latest/vector-search/tutorials/semantic-search/semantic-search-bedrock-titan
179
+
180
+ LANGUAGE: OpenSearch PPL
181
+ CODE:
182
+ ```
183
+ source=my_index | where field1 > 10 | fields field1, field2
184
+ ```
185
+
186
+ --------------------------------
187
+
188
+ TITLE: OpenSearch PPL Syntax and Commands
189
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
190
+
191
+ SOURCE: https://docs.opensearch.org/latest/vector-search/tutorials/semantic-search/semantic-search-sagemaker
192
+
193
+ LANGUAGE: OpenSearch PPL
194
+ CODE:
195
+ ```
196
+ source=my_index | where field1 > 10 | fields field1, field2
197
+ ```
198
+
199
+ --------------------------------
200
+
201
+ TITLE: OpenSearch PPL Syntax and Commands
202
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
203
+
204
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/vector-operations/semantic-search-byte-vectors
205
+
206
+ LANGUAGE: OpenSearch PPL
207
+ CODE:
208
+ ```
209
+ source=my_index | where field1 > 10 | fields field1, field2
210
+ ```
211
+
212
+ --------------------------------
213
+
214
+ TITLE: OpenSearch PPL Syntax and Commands
215
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
216
+
217
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/vector-operations/optimize-compression
218
+
219
+ LANGUAGE: OpenSearch PPL
220
+ CODE:
221
+ ```
222
+ source=my_index | where field1 > 10 | fields field1, field2
223
+ ```
224
+
225
+ --------------------------------
226
+
227
+ TITLE: OpenSearch PPL Syntax and Commands
228
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
229
+
230
+ SOURCE: https://docs.opensearch.org/latest/vector-search/filter-search-knn/efficient-knn-filtering
231
+
232
+ LANGUAGE: OpenSearch PPL
233
+ CODE:
234
+ ```
235
+ source=my_index | where field1 > 10 | fields field1, field2
236
+ ```
237
+
238
+ --------------------------------
239
+
240
+ TITLE: OpenSearch PPL Syntax and Commands
241
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
242
+
243
+ SOURCE: https://docs.opensearch.org/latest/vector-search/vector-search-techniques/index
244
+
245
+ LANGUAGE: OpenSearch PPL
246
+ CODE:
247
+ ```
248
+ source=my_index | where field1 > 10 | fields field1, field2
249
+ ```
250
+
251
+ --------------------------------
252
+
253
+ TITLE: Explain Advanced PPL Query (Simple Format)
254
+ DESCRIPTION: Demonstrates using the `simple` format parameter with the Explain API for a PPL query. This provides a condensed logical plan, omitting detailed attributes.
255
+
256
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/sql-ppl-api
257
+
258
+ LANGUAGE: PPL
259
+ CODE:
260
+ ```
261
+ POST _plugins/_ppl/_explain?format=simple{"query":"source=state_country | where country = 'USA' OR country = 'England' | stats count() by country"}
262
+ ```
263
+
264
+ LANGUAGE: JSON
265
+ CODE:
266
+ ```
267
+ {"calcite":{"logical":"LogicalProject\n LogicalAggregate\n LogicalFilter\n CalciteLogicalIndexScan\n"}}
268
+ ```
269
+
270
+ --------------------------------
271
+
272
+ TITLE: OpenSearch PPL Syntax and Commands
273
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
274
+
275
+ SOURCE: https://docs.opensearch.org/latest/vector-search/tutorials/semantic-search/semantic-search-bedrock-cohere
276
+
277
+ LANGUAGE: OpenSearch PPL
278
+ CODE:
279
+ ```
280
+ source=my_index | where field1 > 10 | fields field1, field2
281
+ ```
282
+
283
+ --------------------------------
284
+
285
+ TITLE: OpenSearch PPL Syntax and Commands
286
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
287
+
288
+ SOURCE: https://docs.opensearch.org/latest/vector-search/tutorials/neural-search-tutorial
289
+
290
+ LANGUAGE: OpenSearch PPL
291
+ CODE:
292
+ ```
293
+ source=my_index | where field1 > 10 | fields field1, field2
294
+ ```
295
+
296
+ --------------------------------
297
+
298
+ TITLE: OpenSearch Notebooks: PPL Code Block
299
+ DESCRIPTION: Illustrates a PPL (Piped Processing Language) code block for OpenSearch notebooks. This example queries sample web logs and returns the first 20 records.
300
+
301
+ SOURCE: https://docs.opensearch.org/latest/observing-your-data/notebooks
302
+
303
+ LANGUAGE: PPL
304
+ CODE:
305
+ ```
306
+ %ppl
307
+ source=opensearch_dashboards_sample_data_logs | head 20
308
+
309
+ ```
310
+
311
+ --------------------------------
312
+
313
+ TITLE: Run PPL Query in OpenSearch Workbench
314
+ DESCRIPTION: This snippet demonstrates a PPL query to retrieve 'firstname' and 'lastname' from the 'accounts' index for users older than 18. It utilizes the 'search' and 'where' commands for data filtering and the 'fields' command to select specific attributes.
315
+
316
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/workbench
317
+
318
+ LANGUAGE: PPL
319
+ CODE:
320
+ ```
321
+ search source=accounts
322
+ | where age > 18
323
+ | fields firstname, lastname
324
+ ```
325
+
326
+ --------------------------------
327
+
328
+ TITLE: OpenSearch PPL Syntax and Commands
329
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
330
+
331
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/model-group-apis/update-model-group
332
+
333
+ LANGUAGE: OpenSearch PPL
334
+ CODE:
335
+ ```
336
+ source=my_index | where field1 > 10 | fields field1, field2
337
+ ```
338
+
339
+ --------------------------------
340
+
341
+ TITLE: OpenSearch PPL Syntax and Commands
342
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
343
+
344
+ SOURCE: https://docs.opensearch.org/latest/vector-search/tutorials/semantic-search
345
+
346
+ LANGUAGE: OpenSearch PPL
347
+ CODE:
348
+ ```
349
+ source=my_index | where field1 > 10 | fields field1, field2
350
+ ```
351
+
352
+ --------------------------------
353
+
354
+ TITLE: OpenSearch PPL Query with 'relation', 'scalar', and 'exists' Subsearches
355
+ DESCRIPTION: This PPL query identifies customers from specific country codes with above-average account balances who have not placed any orders. It demonstrates the use of 'relation', 'scalar', and correlated 'exists' subsearches.
356
+
357
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/subsearch
358
+
359
+ LANGUAGE: PPL
360
+ CODE:
361
+ ```
362
+ source = [
363
+ source = customer
364
+ | where substring(c_phone, 1, 2) in ('13', '31', '23', '29', '30', '18', '17')
365
+ and c_acctbal > [ /* scalar subsearch */
366
+ source = customer
367
+ | where c_acctbal > 0.00
368
+ and substring(c_phone, 1, 2) in ('13', '31', '23', '29', '30', '18', '17')
369
+ | stats avg(c_acctbal)
370
+ ]
371
+ and not exists [ /* correlated exists subsearch */
372
+ source = orders
373
+ | where o_custkey = c_custkey
374
+ ]
375
+ | eval cntrycode = substring(c_phone, 1, 2)
376
+ | fields cntrycode, c_acctbal
377
+ ] as custsale
378
+ | stats count() as numcust, sum(c_acctbal) as totacctbal by cntrycode
379
+ | sort cntrycode
380
+ ```
381
+
382
+ --------------------------------
383
+
384
+ TITLE: OpenSearch PPL Syntax and Commands
385
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
386
+
387
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/model-group-apis/search-model-group
388
+
389
+ LANGUAGE: OpenSearch PPL
390
+ CODE:
391
+ ```
392
+ source=my_index | where field1 > 10 | fields field1, field2
393
+ ```
394
+
395
+ --------------------------------
396
+
397
+ TITLE: Explain Advanced PPL Query (Standard Format)
398
+ DESCRIPTION: Shows an advanced PPL query using the Calcite engine with the Explain API. The response includes both logical and physical execution plans in the standard format.
399
+
400
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/sql-ppl-api
401
+
402
+ LANGUAGE: PPL
403
+ CODE:
404
+ ```
405
+ POST _plugins/_ppl/_explain{"query":"source=state_country | where country = 'USA' OR country = 'England' | stats count() by country"}
406
+ ```
407
+
408
+ LANGUAGE: JSON
409
+ CODE:
410
+ ```
411
+ {"calcite":{"logical":"LogicalProject(count()=[$1], country=[$0])\n LogicalAggregate(group=[{1}], count()=[COUNT()])\n LogicalFilter(condition=[SEARCH($1, Sarg['England', 'USA':CHAR(7)]:CHAR(7))])\n CalciteLogicalIndexScan(table=[[OpenSearch, state_country]])\n","physical":"EnumerableCalc(expr#0..1=[{inputs}], count()=[$t1], country=[$t0])\n CalciteEnumerableIndexScan(table=[[OpenSearch, state_country]], PushDownContext=[[FILTER->SEARCH($1, Sarg['England', 'USA':CHAR(7)]:CHAR(7)), AGGREGATION->rel#53:LogicalAggregate.NONE.[](input=RelSubset#43,group={1},count()=COUNT())], OpenSearchRequestBuilder(sourceBuilder={\"from\":0,\"size\":0,\"timeout\":\"1m\",\"query\":{\"terms\":{\"country\":[\"England\",\"USA\"],\"boost\":1.0}},\"sort\":[{\"_doc\":{\"order\":\"asc\"}}],\"aggregations\":{\"composite_buckets\":{\"composite\":{\"size\":1000,\"sources\":[{\"country\":{\"terms\":{\"field\":\"country\",\"missing_bucket\":true,\"missing_order\":\"first\",\"order\":\"asc\"}}}]},\"aggregations\":{\"count()\":{\"value_count\":{\"field\":\"_index\"}}}}}}, requestedTotalSize=10000, pageSize=null, startFrom=0)])\n"}}
412
+ ```
413
+
414
+ --------------------------------
415
+
416
+ TITLE: OpenSearch PPL Syntax and Commands
417
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
418
+
419
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/model-group-apis/get-model-group
420
+
421
+ LANGUAGE: OpenSearch PPL
422
+ CODE:
423
+ ```
424
+ source=my_index | where field1 > 10 | fields field1, field2
425
+ ```
426
+
427
+ --------------------------------
428
+
429
+ TITLE: PPL 'in' Subsearch Usage Examples
430
+ DESCRIPTION: Provides practical examples of the 'in' subsearch in OpenSearch PPL, demonstrating its application in filtering data, including nested subsearches and its use as a join filter.
431
+
432
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/subsearch
433
+
434
+ LANGUAGE: PPL
435
+ CODE:
436
+ ```
437
+ source = outer | where a in [ source = inner | fields b ]
438
+ source = outer | where (a) in [ source = inner | fields b ]
439
+ source = outer | where (a,b,c) in [ source = inner | fields d,e,f ]
440
+ source = outer | where a not in [ source = inner | fields b ]
441
+ source = outer | where (a) not in [ source = inner | fields b ]
442
+ source = outer | where (a,b,c) not in [ source = inner | fields d,e,f ]
443
+ source = outer a in [ source = inner | fields b ]
444
+ source = outer a not in [ source = inner | fields b ]
445
+ source = outer | where a in [ source = inner1 | where b not in [ source = inner2 | fields c ] | fields b ] // nested
446
+ source = table1 | inner join left = l right = r on l.a = r.a AND r.a in [ source = inner | fields d ] | fields l.a, r.a, b, c //as join filter
447
+ ```
448
+
449
+ --------------------------------
450
+
451
+ TITLE: OpenSearch PPL Syntax and Commands
452
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
453
+
454
+ SOURCE: https://docs.opensearch.org/latest/vector-search/optimizing-storage/index
455
+
456
+ LANGUAGE: OpenSearch PPL
457
+ CODE:
458
+ ```
459
+ source=my_index | where field1 > 10 | fields field1, field2
460
+ ```
461
+
462
+ --------------------------------
463
+
464
+ TITLE: OpenSearch PPL Syntax and Commands
465
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
466
+
467
+ SOURCE: https://docs.opensearch.org/latest/vector-search/remote-index-build
468
+
469
+ LANGUAGE: OpenSearch PPL
470
+ CODE:
471
+ ```
472
+ source=my_index | where field1 > 10 | fields field1, field2
473
+ ```
474
+
475
+ --------------------------------
476
+
477
+ TITLE: Run PPL Query in OpenSearch Workbench
478
+ DESCRIPTION: This snippet demonstrates a PPL query to retrieve 'firstname' and 'lastname' from the 'accounts' index for users older than 18. It utilizes the 'search' and 'where' commands for data filtering and the 'fields' command to select specific attributes.
479
+
480
+ SOURCE: https://docs.opensearch.org/latest/dashboards/query-workbench
481
+
482
+ LANGUAGE: PPL
483
+ CODE:
484
+ ```
485
+ search source=accounts
486
+ | where age > 18
487
+ | fields firstname, lastname
488
+ ```
489
+
490
+ --------------------------------
491
+
492
+ TITLE: OpenSearch PPL Syntax and Commands
493
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
494
+
495
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/model-group-apis/delete-model-group
496
+
497
+ LANGUAGE: OpenSearch PPL
498
+ CODE:
499
+ ```
500
+ source=my_index | where field1 > 10 | fields field1, field2
501
+ ```
502
+
503
+ --------------------------------
504
+
505
+ TITLE: OpenSearch PPL Syntax and Commands
506
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
507
+
508
+ SOURCE: https://docs.opensearch.org/latest/vector-search/tutorials
509
+
510
+ LANGUAGE: OpenSearch PPL
511
+ CODE:
512
+ ```
513
+ source=my_index | where field1 > 10 | fields field1, field2
514
+ ```
515
+
516
+ --------------------------------
517
+
518
+ TITLE: OpenSearch PPL Syntax and Commands
519
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
520
+
521
+ SOURCE: https://docs.opensearch.org/latest/vector-search/filter-search-knn/scoring-script-filter
522
+
523
+ LANGUAGE: OpenSearch PPL
524
+ CODE:
525
+ ```
526
+ source=my_index | where field1 > 10 | fields field1, field2
527
+ ```
528
+
529
+ --------------------------------
530
+
531
+ TITLE: OpenSearch PPL Syntax and Commands
532
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
533
+
534
+ SOURCE: https://docs.opensearch.org/latest/vector-search/specialized-operations/index
535
+
536
+ LANGUAGE: OpenSearch PPL
537
+ CODE:
538
+ ```
539
+ source=my_index | where field1 > 10 | fields field1, field2
540
+ ```
541
+
542
+ --------------------------------
543
+
544
+ TITLE: OpenSearch PPL Syntax and Commands
545
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
546
+
547
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/agentic-memory-apis/update-memory
548
+
549
+ LANGUAGE: OpenSearch PPL
550
+ CODE:
551
+ ```
552
+ source=my_index | where field1 > 10 | fields field1, field2
553
+ ```
554
+
555
+ --------------------------------
556
+
557
+ TITLE: OpenSearch PPL Syntax and Commands
558
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
559
+
560
+ SOURCE: https://docs.opensearch.org/latest/vector-search/specialized-operations/nested-search-knn
561
+
562
+ LANGUAGE: OpenSearch PPL
563
+ CODE:
564
+ ```
565
+ source=my_index | where field1 > 10 | fields field1, field2
566
+ ```
567
+
568
+ --------------------------------
569
+
570
+ TITLE: OpenSearch PPL Syntax and Commands
571
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
572
+
573
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/memory-apis/get-message-traces
574
+
575
+ LANGUAGE: OpenSearch PPL
576
+ CODE:
577
+ ```
578
+ source=my_index | where field1 > 10 | fields field1, field2
579
+ ```
580
+
581
+ --------------------------------
582
+
583
+ TITLE: OpenSearch PPL Syntax and Commands
584
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
585
+
586
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/rule-based-autotagging/autotagging
587
+
588
+ LANGUAGE: OpenSearch PPL
589
+ CODE:
590
+ ```
591
+ source=my_index | where field1 > 10 | fields field1, field2
592
+ ```
593
+
594
+ --------------------------------
595
+
596
+ TITLE: OpenSearch PPL Syntax and Commands
597
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
598
+
599
+ SOURCE: https://docs.opensearch.org/latest/vector-search/llm-frameworks
600
+
601
+ LANGUAGE: OpenSearch PPL
602
+ CODE:
603
+ ```
604
+ source=my_index | where field1 > 10 | fields field1, field2
605
+ ```
606
+
607
+ --------------------------------
608
+
609
+ TITLE: OpenSearch PPL Syntax and Commands
610
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
611
+
612
+ SOURCE: https://docs.opensearch.org/latest/aggregations/pipeline/percentiles-bucket
613
+
614
+ LANGUAGE: OpenSearch PPL
615
+ CODE:
616
+ ```
617
+ source=my_index | where field1 > 10 | fields field1, field2
618
+ ```
619
+
620
+ --------------------------------
621
+
622
+ TITLE: OpenSearch PPL Syntax and Commands
623
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
624
+
625
+ SOURCE: https://docs.opensearch.org/latest/observing-your-data/alerting/per-cluster-metrics-monitors
626
+
627
+ LANGUAGE: OpenSearch PPL
628
+ CODE:
629
+ ```
630
+ source=my_index | where field1 > 10 | fields field1, field2
631
+ ```
632
+
633
+ --------------------------------
634
+
635
+ TITLE: OpenSearch PPL Syntax and Commands
636
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
637
+
638
+ SOURCE: https://docs.opensearch.org/latest/vector-search/searching-data
639
+
640
+ LANGUAGE: OpenSearch PPL
641
+ CODE:
642
+ ```
643
+ source=my_index | where field1 > 10 | fields field1, field2
644
+ ```
645
+
646
+ --------------------------------
647
+
648
+ TITLE: OpenSearch PPL Syntax and Commands
649
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
650
+
651
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/semantic-search/semantic-search-cfn-sagemaker
652
+
653
+ LANGUAGE: OpenSearch PPL
654
+ CODE:
655
+ ```
656
+ source=my_index | where field1 > 10 | fields field1, field2
657
+ ```
658
+
659
+ --------------------------------
660
+
661
+ TITLE: Create Application Analytics Visualization with PPL
662
+ DESCRIPTION: This snippet demonstrates how to use PPL (Piped Processing Language) to create a time series metric for application analytics. It shows a basic query structure involving data sources, transformations, and aggregation by time spans.
663
+
664
+ SOURCE: https://docs.opensearch.org/latest/observing-your-data/app-analytics
665
+
666
+ LANGUAGE: PPL
667
+ CODE:
668
+ ```
669
+ source = <index_name> | ... | ... | stats ... by span(<timestamp_field>, 1h)
670
+ ```
671
+
672
+ --------------------------------
673
+
674
+ TITLE: OpenSearch PPL Syntax and Commands
675
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
676
+
677
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/memory-apis/get-message
678
+
679
+ LANGUAGE: OpenSearch PPL
680
+ CODE:
681
+ ```
682
+ source=my_index | where field1 > 10 | fields field1, field2
683
+ ```
684
+
685
+ --------------------------------
686
+
687
+ TITLE: OpenSearch PPL Syntax and Commands
688
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
689
+
690
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/gpu-acceleration
691
+
692
+ LANGUAGE: OpenSearch PPL
693
+ CODE:
694
+ ```
695
+ source=my_index | where field1 > 10 | fields field1, field2
696
+ ```
697
+
698
+ --------------------------------
699
+
700
+ TITLE: PPL dedup example: Consecutive documents
701
+ DESCRIPTION: Provides an example of using the 'consecutive=true' option with the 'dedup' command to remove only consecutive duplicate documents based on a field.
702
+
703
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/functions
704
+
705
+ LANGUAGE: PPL
706
+ CODE:
707
+ ```
708
+ search source=accounts | dedup gender consecutive=true | fields account_number, gender;
709
+ ```
710
+
711
+ --------------------------------
712
+
713
+ TITLE: OpenSearch PPL Syntax and Commands
714
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
715
+
716
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ingesting-data
717
+
718
+ LANGUAGE: OpenSearch PPL
719
+ CODE:
720
+ ```
721
+ source=my_index | where field1 > 10 | fields field1, field2
722
+ ```
723
+
724
+ --------------------------------
725
+
726
+ TITLE: OpenSearch PPL Syntax and Commands
727
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
728
+
729
+ SOURCE: https://docs.opensearch.org/latest/monitoring-your-cluster/job-scheduler/index
730
+
731
+ LANGUAGE: OpenSearch PPL
732
+ CODE:
733
+ ```
734
+ source=my_index | where field1 > 10 | fields field1, field2
735
+ ```
736
+
737
+ --------------------------------
738
+
739
+ TITLE: OpenSearch PPL Syntax and Commands
740
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
741
+
742
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ingesting-data/text-chunking
743
+
744
+ LANGUAGE: OpenSearch PPL
745
+ CODE:
746
+ ```
747
+ source=my_index | where field1 > 10 | fields field1, field2
748
+ ```
749
+
750
+ --------------------------------
751
+
752
+ TITLE: OpenSearch PPL Syntax and Commands
753
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
754
+
755
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/agentic-memory-apis/delete-memory-container
756
+
757
+ LANGUAGE: OpenSearch PPL
758
+ CODE:
759
+ ```
760
+ source=my_index | where field1 > 10 | fields field1, field2
761
+ ```
762
+
763
+ --------------------------------
764
+
765
+ TITLE: OpenSearch PPL Syntax and Commands
766
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
767
+
768
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/shard-indexing-settings
769
+
770
+ LANGUAGE: OpenSearch PPL
771
+ CODE:
772
+ ```
773
+ source=my_index | where field1 > 10 | fields field1, field2
774
+ ```
775
+
776
+ --------------------------------
777
+
778
+ TITLE: OpenSearch PPL Syntax and Commands
779
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
780
+
781
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/neural-sparse-with-raw-vectors
782
+
783
+ LANGUAGE: OpenSearch PPL
784
+ CODE:
785
+ ```
786
+ source=my_index | where field1 > 10 | fields field1, field2
787
+ ```
788
+
789
+ --------------------------------
790
+
791
+ TITLE: Register Flow Agent with PPLTool
792
+ DESCRIPTION: Registers a flow agent designed to use the PPLTool for natural language to PPL query translation and execution. It specifies the model ID, tool description, and execution behavior.
793
+
794
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/tools/ppl-tool
795
+
796
+ LANGUAGE: OpenSearch API
797
+ CODE:
798
+ ```
799
+ POST/_plugins/_ml/agents/_register
800
+ {"name":"Test_Agent_For_PPL","type":"flow","description":"this is a test agent","memory":{"type":"demo"},"tools":[{"type":"PPLTool","name":"TransferQuestionToPPLAndExecuteTool","description":"Use this tool to transfer natural language to generate PPL and execute PPL to query inside. Use this tool after you know the index name, otherwise, call IndexRoutingTool first. The input parameters are: {index:IndexName, question:UserQuestion}","parameters":{"model_id":"h5AUWo0BkIylWTeYT4SU","model_type":"FINETUNE","execute":true}}]}
801
+ ```
802
+
803
+ --------------------------------
804
+
805
+ TITLE: OpenSearch PPL Syntax and Commands
806
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
807
+
808
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/semantic-search/semantic-search-sagemaker
809
+
810
+ LANGUAGE: OpenSearch PPL
811
+ CODE:
812
+ ```
813
+ source=my_index | where field1 > 10 | fields field1, field2
814
+ ```
815
+
816
+ --------------------------------
817
+
818
+ TITLE: OpenSearch PPL Syntax and Commands
819
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
820
+
821
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/point-in-time
822
+
823
+ LANGUAGE: OpenSearch PPL
824
+ CODE:
825
+ ```
826
+ source=my_index | where field1 > 10 | fields field1, field2
827
+ ```
828
+
829
+ --------------------------------
830
+
831
+ TITLE: Execute Flow Agent
832
+ DESCRIPTION: Executes a registered flow agent with a specific question and index. The agent processes the question using the PPLTool and returns the PPL query and its execution results.
833
+
834
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/tools/ppl-tool
835
+
836
+ LANGUAGE: OpenSearch API
837
+ CODE:
838
+ ```
839
+ POST/_plugins/_ml/agents/9X7xWI0Bpc3sThaJdY9i/_execute
840
+ {"parameters":{"verbose":true,"question":"what is the error rate yesterday","index":"opensearch_dashboards_sample_data_logs"}}
841
+ ```
842
+
843
+ --------------------------------
844
+
845
+ TITLE: OpenSearch PPL Syntax and Commands
846
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
847
+
848
+ SOURCE: https://docs.opensearch.org/latest/vector-search/api/knn
849
+
850
+ LANGUAGE: OpenSearch PPL
851
+ CODE:
852
+ ```
853
+ source=my_index | where field1 > 10 | fields field1, field2
854
+ ```
855
+
856
+ --------------------------------
857
+
858
+ TITLE: OpenSearch PPL Syntax and Commands
859
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
860
+
861
+ SOURCE: https://docs.opensearch.org/latest/vector-search/filter-search-knn/index
862
+
863
+ LANGUAGE: OpenSearch PPL
864
+ CODE:
865
+ ```
866
+ source=my_index | where field1 > 10 | fields field1, field2
867
+ ```
868
+
869
+ --------------------------------
870
+
871
+ TITLE: OpenSearch PPL Syntax and Commands
872
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
873
+
874
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/tools/vector-db-tool
875
+
876
+ LANGUAGE: OpenSearch PPL
877
+ CODE:
878
+ ```
879
+ source=my_index | where field1 > 10 | fields field1, field2
880
+ ```
881
+
882
+ --------------------------------
883
+
884
+ TITLE: OpenSearch PPL Syntax and Commands
885
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
886
+
887
+ SOURCE: https://docs.opensearch.org/latest/vector-search/api/neural
888
+
889
+ LANGUAGE: OpenSearch PPL
890
+ CODE:
891
+ ```
892
+ source=my_index | where field1 > 10 | fields field1, field2
893
+ ```
894
+
895
+ --------------------------------
896
+
897
+ TITLE: OpenSearch PPL Syntax and Commands
898
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
899
+
900
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/point-in-time-api
901
+
902
+ LANGUAGE: OpenSearch PPL
903
+ CODE:
904
+ ```
905
+ source=my_index | where field1 > 10 | fields field1, field2
906
+ ```
907
+
908
+ --------------------------------
909
+
910
+ TITLE: OpenSearch PPL Syntax and Commands
911
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
912
+
913
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/memory-apis/create-message
914
+
915
+ LANGUAGE: OpenSearch PPL
916
+ CODE:
917
+ ```
918
+ source=my_index | where field1 > 10 | fields field1, field2
919
+ ```
920
+
921
+ --------------------------------
922
+
923
+ TITLE: OpenSearch PPL Syntax and Commands
924
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
925
+
926
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/vector-operations/index
927
+
928
+ LANGUAGE: OpenSearch PPL
929
+ CODE:
930
+ ```
931
+ source=my_index | where field1 > 10 | fields field1, field2
932
+ ```
933
+
934
+ --------------------------------
935
+
936
+ TITLE: OpenSearch PPL Syntax and Commands
937
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
938
+
939
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/agentic-memory-apis/index
940
+
941
+ LANGUAGE: OpenSearch PPL
942
+ CODE:
943
+ ```
944
+ source=my_index | where field1 > 10 | fields field1, field2
945
+ ```
946
+
947
+ --------------------------------
948
+
949
+ TITLE: OpenSearch PPL Syntax and Commands
950
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
951
+
952
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/train-predict/train-and-predict
953
+
954
+ LANGUAGE: OpenSearch PPL
955
+ CODE:
956
+ ```
957
+ source=my_index | where field1 > 10 | fields field1, field2
958
+ ```
959
+
960
+ --------------------------------
961
+
962
+ TITLE: OpenSearch PPL Syntax and Commands
963
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
964
+
965
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/semantic-search/semantic-search-cohere
966
+
967
+ LANGUAGE: OpenSearch PPL
968
+ CODE:
969
+ ```
970
+ source=my_index | where field1 > 10 | fields field1, field2
971
+ ```
972
+
973
+ --------------------------------
974
+
975
+ TITLE: OpenSearch PPL Syntax and Commands
976
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
977
+
978
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search/sorting
979
+
980
+ LANGUAGE: OpenSearch PPL
981
+ CODE:
982
+ ```
983
+ source=my_index | where field1 > 10 | fields field1, field2
984
+ ```
985
+
986
+ --------------------------------
987
+
988
+ TITLE: OpenSearch PPL Syntax and Commands
989
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
990
+
991
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/semantic-highlighting-tutorial
992
+
993
+ LANGUAGE: OpenSearch PPL
994
+ CODE:
995
+ ```
996
+ source=my_index | where field1 > 10 | fields field1, field2
997
+ ```
998
+
999
+ --------------------------------
1000
+
1001
+ TITLE: OpenSearch PPL Syntax and Commands
1002
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1003
+
1004
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/concurrent-segment-search
1005
+
1006
+ LANGUAGE: OpenSearch PPL
1007
+ CODE:
1008
+ ```
1009
+ source=my_index | where field1 > 10 | fields field1, field2
1010
+ ```
1011
+
1012
+ --------------------------------
1013
+
1014
+ TITLE: OpenSearch PPL Syntax and Commands
1015
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1016
+
1017
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/index
1018
+
1019
+ LANGUAGE: OpenSearch PPL
1020
+ CODE:
1021
+ ```
1022
+ source=my_index | where field1 > 10 | fields field1, field2
1023
+ ```
1024
+
1025
+ --------------------------------
1026
+
1027
+ TITLE: OpenSearch PPL Syntax and Commands
1028
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1029
+
1030
+ SOURCE: https://docs.opensearch.org/latest/tutorials/gen-ai/model-controls/bedrock-guardrails
1031
+
1032
+ LANGUAGE: OpenSearch PPL
1033
+ CODE:
1034
+ ```
1035
+ source=my_index | where field1 > 10 | fields field1, field2
1036
+ ```
1037
+
1038
+ --------------------------------
1039
+
1040
+ TITLE: OpenSearch PPL Syntax and Commands
1041
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1042
+
1043
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search/search-after
1044
+
1045
+ LANGUAGE: OpenSearch PPL
1046
+ CODE:
1047
+ ```
1048
+ source=my_index | where field1 > 10 | fields field1, field2
1049
+ ```
1050
+
1051
+ --------------------------------
1052
+
1053
+ TITLE: OpenSearch PPL Syntax and Commands
1054
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1055
+
1056
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/semantic-search
1057
+
1058
+ LANGUAGE: OpenSearch PPL
1059
+ CODE:
1060
+ ```
1061
+ source=my_index | where field1 > 10 | fields field1, field2
1062
+ ```
1063
+
1064
+ --------------------------------
1065
+
1066
+ TITLE: OpenSearch PPL Syntax and Commands
1067
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1068
+
1069
+ SOURCE: https://docs.opensearch.org/latest/analyzers/tokenizers/character-group
1070
+
1071
+ LANGUAGE: OpenSearch PPL
1072
+ CODE:
1073
+ ```
1074
+ source=my_index | where field1 > 10 | fields field1, field2
1075
+ ```
1076
+
1077
+ --------------------------------
1078
+
1079
+ TITLE: OpenSearch PPL Syntax and Commands
1080
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1081
+
1082
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search/explain
1083
+
1084
+ LANGUAGE: OpenSearch PPL
1085
+ CODE:
1086
+ ```
1087
+ source=my_index | where field1 > 10 | fields field1, field2
1088
+ ```
1089
+
1090
+ --------------------------------
1091
+
1092
+ TITLE: OpenSearch PPL Syntax and Commands
1093
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1094
+
1095
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/snapshots/sm-api
1096
+
1097
+ LANGUAGE: OpenSearch PPL
1098
+ CODE:
1099
+ ```
1100
+ source=my_index | where field1 > 10 | fields field1, field2
1101
+ ```
1102
+
1103
+ --------------------------------
1104
+
1105
+ TITLE: OpenSearch PPL Syntax and Commands
1106
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1107
+
1108
+ SOURCE: https://docs.opensearch.org/latest/observing-your-data/forecast/api
1109
+
1110
+ LANGUAGE: OpenSearch PPL
1111
+ CODE:
1112
+ ```
1113
+ source=my_index | where field1 > 10 | fields field1, field2
1114
+ ```
1115
+
1116
+ --------------------------------
1117
+
1118
+ TITLE: OpenSearch PPL Syntax and Commands
1119
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1120
+
1121
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search/index
1122
+
1123
+ LANGUAGE: OpenSearch PPL
1124
+ CODE:
1125
+ ```
1126
+ source=my_index | where field1 > 10 | fields field1, field2
1127
+ ```
1128
+
1129
+ --------------------------------
1130
+
1131
+ TITLE: OpenSearch PPL Syntax and Commands
1132
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1133
+
1134
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/conversational-search
1135
+
1136
+ LANGUAGE: OpenSearch PPL
1137
+ CODE:
1138
+ ```
1139
+ source=my_index | where field1 > 10 | fields field1, field2
1140
+ ```
1141
+
1142
+ --------------------------------
1143
+
1144
+ TITLE: OpenSearch PPL: Match Query
1145
+ DESCRIPTION: Illustrates how to use the 'match' function in OpenSearch's PPL (Piped Processing Language) for full-text search. This enables users to query text data using a pipeline-based syntax, similar to other data processing tools.
1146
+
1147
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/full-text
1148
+
1149
+ LANGUAGE: PPL
1150
+ CODE:
1151
+ ```
1152
+ SOURCE=my_index | WHERE match(message, "this is a test") | FIELDS message
1153
+ ```
1154
+
1155
+ LANGUAGE: PPL
1156
+ CODE:
1157
+ ```
1158
+ SOURCE=my_index | WHERE match(message, "this is a test", operator='and') | FIELDS message
1159
+ ```
1160
+
1161
+ LANGUAGE: PPL
1162
+ CODE:
1163
+ ```
1164
+ SOURCE=my_index | WHERE match(message, "this is a test", operator='and', zero_terms_query='all') | FIELDS message
1165
+ ```
1166
+
1167
+ --------------------------------
1168
+
1169
+ TITLE: OpenSearch PPL Syntax and Commands
1170
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1171
+
1172
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/replication-plugin/settings
1173
+
1174
+ LANGUAGE: OpenSearch PPL
1175
+ CODE:
1176
+ ```
1177
+ source=my_index | where field1 > 10 | fields field1, field2
1178
+ ```
1179
+
1180
+ --------------------------------
1181
+
1182
+ TITLE: PPL Search Syntax
1183
+ DESCRIPTION: Defines the basic syntax for the PPL 'search' command, specifying the source index and optional boolean expressions. The 'search' command can be omitted if it's the first command.
1184
+
1185
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/syntax
1186
+
1187
+ LANGUAGE: PPL
1188
+ CODE:
1189
+ ```
1190
+ search source=<index> [boolean-expression]
1191
+ source=<index> [boolean-expression]
1192
+ ```
1193
+
1194
+ --------------------------------
1195
+
1196
+ TITLE: OpenSearch PPL Syntax and Commands
1197
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1198
+
1199
+ SOURCE: https://docs.opensearch.org/latest/vector-search/ai-search/hybrid-search/collapse
1200
+
1201
+ LANGUAGE: OpenSearch PPL
1202
+ CODE:
1203
+ ```
1204
+ source=my_index | where field1 > 10 | fields field1, field2
1205
+ ```
1206
+
1207
+ --------------------------------
1208
+
1209
+ TITLE: OpenSearch PPL Syntax and Commands
1210
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1211
+
1212
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/neural-search-tutorial
1213
+
1214
+ LANGUAGE: OpenSearch PPL
1215
+ CODE:
1216
+ ```
1217
+ source=my_index | where field1 > 10 | fields field1, field2
1218
+ ```
1219
+
1220
+ --------------------------------
1221
+
1222
+ TITLE: OpenSearch PPL Syntax and Commands
1223
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1224
+
1225
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/agents/conversational-flow
1226
+
1227
+ LANGUAGE: OpenSearch PPL
1228
+ CODE:
1229
+ ```
1230
+ source=my_index | where field1 > 10 | fields field1, field2
1231
+ ```
1232
+
1233
+ --------------------------------
1234
+
1235
+ TITLE: OpenSearch PPL Syntax and Commands
1236
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1237
+
1238
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/search-pipelines/score-ranker-processor
1239
+
1240
+ LANGUAGE: OpenSearch PPL
1241
+ CODE:
1242
+ ```
1243
+ source=my_index | where field1 > 10 | fields field1, field2
1244
+ ```
1245
+
1246
+ --------------------------------
1247
+
1248
+ TITLE: OpenSearch PPL Syntax and Commands
1249
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1250
+
1251
+ SOURCE: https://docs.opensearch.org/latest/replication-plugin/permissions
1252
+
1253
+ LANGUAGE: OpenSearch PPL
1254
+ CODE:
1255
+ ```
1256
+ source=my_index | where field1 > 10 | fields field1, field2
1257
+ ```
1258
+
1259
+ --------------------------------
1260
+
1261
+ TITLE: OpenSearch PPL Syntax and Commands
1262
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1263
+
1264
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/search-relevance/using-search-relevance-workbench
1265
+
1266
+ LANGUAGE: OpenSearch PPL
1267
+ CODE:
1268
+ ```
1269
+ source=my_index | where field1 > 10 | fields field1, field2
1270
+ ```
1271
+
1272
+ --------------------------------
1273
+
1274
+ TITLE: OpenSearch PPL Syntax and Commands
1275
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1276
+
1277
+ SOURCE: https://docs.opensearch.org/latest/tutorials/reranking/reranking-cohere-bedrock
1278
+
1279
+ LANGUAGE: OpenSearch PPL
1280
+ CODE:
1281
+ ```
1282
+ source=my_index | where field1 > 10 | fields field1, field2
1283
+ ```
1284
+
1285
+ --------------------------------
1286
+
1287
+ TITLE: Create PPL Visualization in OpenSearch Dashboards
1288
+ DESCRIPTION: This snippet outlines the steps to create a visualization using Piped Processing Language (PPL) in OpenSearch Dashboards. It involves entering a PPL query, setting a time filter, selecting a visualization type, and saving the visualization.
1289
+
1290
+ SOURCE: https://docs.opensearch.org/latest/observing-your-data/event-analytics
1291
+
1292
+ LANGUAGE: OpenSearch Dashboards
1293
+ CODE:
1294
+ ```
1295
+ source = opensearch_dashboards_sample_data_flights | stats count() by DestCountry
1296
+ ```
1297
+
1298
+ --------------------------------
1299
+
1300
+ TITLE: OpenSearch PPL Syntax and Commands
1301
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1302
+
1303
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/model-apis/undeploy-model
1304
+
1305
+ LANGUAGE: OpenSearch PPL
1306
+ CODE:
1307
+ ```
1308
+ source=my_index | where field1 > 10 | fields field1, field2
1309
+ ```
1310
+
1311
+ --------------------------------
1312
+
1313
+ TITLE: OpenSearch PPL Syntax and Commands
1314
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1315
+
1316
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/agents/plan-execute-reflect
1317
+
1318
+ LANGUAGE: OpenSearch PPL
1319
+ CODE:
1320
+ ```
1321
+ source=my_index | where field1 > 10 | fields field1, field2
1322
+ ```
1323
+
1324
+ --------------------------------
1325
+
1326
+ TITLE: OpenSearch PPL Syntax and Commands
1327
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1328
+
1329
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/memory-apis/create-memory
1330
+
1331
+ LANGUAGE: OpenSearch PPL
1332
+ CODE:
1333
+ ```
1334
+ source=my_index | where field1 > 10 | fields field1, field2
1335
+ ```
1336
+
1337
+ --------------------------------
1338
+
1339
+ TITLE: OpenSearch PPL Syntax and Commands
1340
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1341
+
1342
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/index
1343
+
1344
+ LANGUAGE: OpenSearch PPL
1345
+ CODE:
1346
+ ```
1347
+ source=my_index | where field1 > 10 | fields field1, field2
1348
+ ```
1349
+
1350
+ --------------------------------
1351
+
1352
+ TITLE: OpenSearch PPL Syntax and Commands
1353
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1354
+
1355
+ SOURCE: https://docs.opensearch.org/latest/tutorials/gen-ai/rag/conversational-search-claude-bedrock
1356
+
1357
+ LANGUAGE: OpenSearch PPL
1358
+ CODE:
1359
+ ```
1360
+ source=my_index | where field1 > 10 | fields field1, field2
1361
+ ```
1362
+
1363
+ --------------------------------
1364
+
1365
+ TITLE: OpenSearch PPL Query with 'in' and 'scalar' Subsearches
1366
+ DESCRIPTION: This PPL query finds suppliers from Canada who supply parts with names starting with 'forest' and have availability quantities greater than half of the total quantity ordered in 1994. It utilizes nested 'in' subsearches and a 'scalar' subsearch.
1367
+
1368
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/subsearch
1369
+
1370
+ LANGUAGE: PPL
1371
+ CODE:
1372
+ ```
1373
+ source = supplier
1374
+ | join ON s_nationkey = n_nationkey nation
1375
+ | where n_name = 'CANADA'
1376
+ and s_suppkey in [ /* in subsearch */
1377
+ source = partsupp
1378
+ | where ps_partkey in [ /* nested in subsearch */
1379
+ source = part
1380
+ | where like(p_name, 'forest%')
1381
+ | fields p_partkey
1382
+ ]
1383
+ and ps_availqty > [ /* scalar subsearch */
1384
+ source = lineitem
1385
+ | where l_partkey = ps_partkey
1386
+ and l_suppkey = ps_suppkey
1387
+ and l_shipdate >= date('1994-01-01')
1388
+ and l_shipdate < date_add(date('1994-01-01'), interval 1 year)
1389
+ | stats sum(l_quantity) as sum_l_quantity
1390
+ | eval half_sum_l_quantity = 0.5 * sum_l_quantity
1391
+ | fields half_sum_l_quantity
1392
+ ]
1393
+ | fields ps_suppkey
1394
+ ]
1395
+ ```
1396
+
1397
+ --------------------------------
1398
+
1399
+ TITLE: OpenSearch PPL Syntax and Commands
1400
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1401
+
1402
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/index
1403
+
1404
+ LANGUAGE: OpenSearch PPL
1405
+ CODE:
1406
+ ```
1407
+ source=my_index | where field1 > 10 | fields field1, field2
1408
+ ```
1409
+
1410
+ --------------------------------
1411
+
1412
+ TITLE: OpenSearch PPL Syntax and Commands
1413
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1414
+
1415
+ SOURCE: https://docs.opensearch.org/latest/tutorials/gen-ai/chatbots
1416
+
1417
+ LANGUAGE: OpenSearch PPL
1418
+ CODE:
1419
+ ```
1420
+ source=my_index | where field1 > 10 | fields field1, field2
1421
+ ```
1422
+
1423
+ --------------------------------
1424
+
1425
+ TITLE: OpenSearch PPL Syntax and Commands
1426
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1427
+
1428
+ SOURCE: https://docs.opensearch.org/latest/security-plugin/access-control/permissions
1429
+
1430
+ LANGUAGE: OpenSearch PPL
1431
+ CODE:
1432
+ ```
1433
+ source=my_index | where field1 > 10 | fields field1, field2
1434
+ ```
1435
+
1436
+ --------------------------------
1437
+
1438
+ TITLE: OpenSearch PPL Syntax and Commands
1439
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1440
+
1441
+ SOURCE: https://docs.opensearch.org/latest/monitoring-your-cluster/job-scheduler/jobs
1442
+
1443
+ LANGUAGE: OpenSearch PPL
1444
+ CODE:
1445
+ ```
1446
+ source=my_index | where field1 > 10 | fields field1, field2
1447
+ ```
1448
+
1449
+ --------------------------------
1450
+
1451
+ TITLE: PPL dedup example: Remove duplicates by gender
1452
+ DESCRIPTION: Demonstrates how to use the PPL 'dedup' command to remove documents with duplicate 'gender' values. The example shows the search query and the resulting fields.
1453
+
1454
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/sql/ppl/functions
1455
+
1456
+ LANGUAGE: PPL
1457
+ CODE:
1458
+ ```
1459
+ search source=accounts | dedup gender | fields account_number, gender;
1460
+ ```
1461
+
1462
+ --------------------------------
1463
+
1464
+ TITLE: OpenSearch PPL Syntax and Commands
1465
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1466
+
1467
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/agent-apis/update-agent
1468
+
1469
+ LANGUAGE: OpenSearch PPL
1470
+ CODE:
1471
+ ```
1472
+ source=my_index | where field1 > 10 | fields field1, field2
1473
+ ```
1474
+
1475
+ --------------------------------
1476
+
1477
+ TITLE: OpenSearch PPL Syntax and Commands
1478
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1479
+
1480
+ SOURCE: https://docs.opensearch.org/latest/tutorials/vector-search/semantic-search/long-document
1481
+
1482
+ LANGUAGE: OpenSearch PPL
1483
+ CODE:
1484
+ ```
1485
+ source=my_index | where field1 > 10 | fields field1, field2
1486
+ ```
1487
+
1488
+ --------------------------------
1489
+
1490
+ TITLE: OpenSearch PPL Syntax and Commands
1491
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1492
+
1493
+ SOURCE: https://docs.opensearch.org/latest/analyzers/language-analyzers/latvian
1494
+
1495
+ LANGUAGE: OpenSearch PPL
1496
+ CODE:
1497
+ ```
1498
+ source=my_index | where field1 > 10 | fields field1, field2
1499
+ ```
1500
+
1501
+ --------------------------------
1502
+
1503
+ TITLE: OpenSearch PPL Syntax and Commands
1504
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1505
+
1506
+ SOURCE: https://docs.opensearch.org/latest/search-plugins/neural-sparse-search
1507
+
1508
+ LANGUAGE: OpenSearch PPL
1509
+ CODE:
1510
+ ```
1511
+ source=my_index | where field1 > 10 | fields field1, field2
1512
+ ```
1513
+
1514
+ --------------------------------
1515
+
1516
+ TITLE: OpenSearch PPL Syntax and Commands
1517
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1518
+
1519
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/tools/log-pattern-tool
1520
+
1521
+ LANGUAGE: OpenSearch PPL
1522
+ CODE:
1523
+ ```
1524
+ source=my_index | where field1 > 10 | fields field1, field2
1525
+ ```
1526
+
1527
+ --------------------------------
1528
+
1529
+ TITLE: OpenSearch PPL Syntax and Commands
1530
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1531
+
1532
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/availability-and-recovery/remote-store/index
1533
+
1534
+ LANGUAGE: OpenSearch PPL
1535
+ CODE:
1536
+ ```
1537
+ source=my_index | where field1 > 10 | fields field1, field2
1538
+ ```
1539
+
1540
+ --------------------------------
1541
+
1542
+ TITLE: OpenSearch PPL Syntax and Commands
1543
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1544
+
1545
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/api/tasks-apis/search-task
1546
+
1547
+ LANGUAGE: OpenSearch PPL
1548
+ CODE:
1549
+ ```
1550
+ source=my_index | where field1 > 10 | fields field1, field2
1551
+ ```
1552
+
1553
+ --------------------------------
1554
+
1555
+ TITLE: OpenSearch PPL Syntax and Commands
1556
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1557
+
1558
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/agents-tools/tools/ppl-tool
1559
+
1560
+ LANGUAGE: OpenSearch PPL
1561
+ CODE:
1562
+ ```
1563
+ source=my_index | where field1 > 10 | fields field1, field2
1564
+ ```
1565
+
1566
+ --------------------------------
1567
+
1568
+ TITLE: OpenSearch PPL Syntax and Commands
1569
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1570
+
1571
+ SOURCE: https://docs.opensearch.org/latest/tuning-your-cluster/cluster
1572
+
1573
+ LANGUAGE: OpenSearch PPL
1574
+ CODE:
1575
+ ```
1576
+ source=my_index | where field1 > 10 | fields field1, field2
1577
+ ```
1578
+
1579
+ --------------------------------
1580
+
1581
+ TITLE: OpenSearch PPL Syntax and Commands
1582
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1583
+
1584
+ SOURCE: https://docs.opensearch.org/latest/ml-commons-plugin/pretrained-models
1585
+
1586
+ LANGUAGE: OpenSearch PPL
1587
+ CODE:
1588
+ ```
1589
+ source=my_index | where field1 > 10 | fields field1, field2
1590
+ ```
1591
+
1592
+ --------------------------------
1593
+
1594
+ TITLE: OpenSearch PPL Syntax and Commands
1595
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1596
+
1597
+ SOURCE: https://docs.opensearch.org/latest/tutorials/gen-ai/model-controls
1598
+
1599
+ LANGUAGE: OpenSearch PPL
1600
+ CODE:
1601
+ ```
1602
+ source=my_index | where field1 > 10 | fields field1, field2
1603
+ ```
1604
+
1605
+ --------------------------------
1606
+
1607
+ TITLE: OpenSearch PPL Syntax and Commands
1608
+ DESCRIPTION: Documentation on the PPL (Piped Processing Language) syntax, including commands, subsearches, identifiers, data types, and functions used within OpenSearch.
1609
+
1610
+ SOURCE: https://docs.opensearch.org/latest/api-reference/search-apis/point-in-time-api
1611
+
1612
+ LANGUAGE: OpenSearch PPL
1613
+ CODE:
1614
+ ```
1615
+ source=my_index | where field1 > 10 | fields field1, field2
1616
+ ```