forked from opensearch-project/documentation-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework plugins doc and add the mapper-size plugin (opensearch-project…
…#7646) * Add documentation about the mapper-size plugin Signed-off-by: Craig Perkins <[email protected]> * Fix link checker Signed-off-by: Craig Perkins <[email protected]> * Apply feedback Signed-off-by: Craig Perkins <[email protected]> * Fix links Signed-off-by: Craig Perkins <[email protected]> * Respond to feedback Signed-off-by: Craig Perkins <[email protected]> * fix-nav-pane Signed-off-by: Heather Halter <[email protected]> * fixed-parent Signed-off-by: Heather Halter <[email protected]> * additional-formatting-changes Signed-off-by: Heather Halter <[email protected]> * moretweaks Signed-off-by: Heather Halter <[email protected]> * more tweaks Signed-off-by: Heather Halter <[email protected]> * reworded the intros and added collapsible blocks Signed-off-by: Heather Halter <[email protected]> * small tweak Signed-off-by: Heather Halter <[email protected]> * more tweaks to wording Signed-off-by: Heather Halter <[email protected]> * Update installation message text Signed-off-by: Craig Perkins <[email protected]> * Update _install-and-configure/additional-plugins/index.md Co-authored-by: Heather Halter <[email protected]> Signed-off-by: Craig Perkins <[email protected]> * Mention more core functionality Signed-off-by: Craig Perkins <[email protected]> * final changes Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Naarcha-AWS <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/additional-plugins/index.md Co-authored-by: Naarcha-AWS <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/additional-plugins/index.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/additional-plugins/index.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/additional-plugins/mapper-size-plugin.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/additional-plugins/mapper-size-plugin.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: Heather Halter <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Heather Halter <[email protected]> Signed-off-by: Craig Perkins <[email protected]> * Update _install-and-configure/plugins.md Co-authored-by: Heather Halter <[email protected]> Signed-off-by: Craig Perkins <[email protected]> --------- Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Heather Halter <[email protected]> Signed-off-by: Craig Perkins <[email protected]> Signed-off-by: Heather Halter <[email protected]> Co-authored-by: Heather Halter <[email protected]> Co-authored-by: Naarcha-AWS <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
- Loading branch information
Showing
3 changed files
with
200 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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,40 @@ | ||
--- | ||
layout: default | ||
title: Additional plugins | ||
parent: Installing plugins | ||
nav_order: 10 | ||
--- | ||
|
||
# Additional plugins | ||
|
||
There are many more plugins available in addition to those provided by the standard distribution of OpenSearch. These additional plugins have been built by OpenSearch developers or members of the OpenSearch community. While it isn't possible to provide an exhaustive list (because many plugins are not maintained in an OpenSearch GitHub repository), the following plugins, available in the [OpenSearch/plugins](https://github.com/opensearch-project/OpenSearch/tree/main/plugins) directory on GitHub, are some of the plugins that can be installed using one of the installation options, for example, using the command `bin/opensearch-plugin install <plugin-name>`. | ||
|
||
|
||
| Plugin name | Earliest available version | | ||
| :--- | :--- | | ||
| analysis-icu | 1.0.0 | | ||
| analysis-kuromoji | 1.0.0 | | ||
| analysis-nori | 1.0.0 | | ||
| analysis-phonetic | 1.0.0 | | ||
| analysis-smartcn | 1.0.0 | | ||
| analysis-stempel | 1.0.0 | | ||
| analysis-ukrainian | 1.0.0 | | ||
| discovery-azure-classic | 1.0.0 | | ||
| discovery-ec2 | 1.0.0 | | ||
| discovery-gce | 1.0.0 | | ||
| ingest-attachment | 1.0.0 | | ||
| mapper-annotated-text | 1.0.0 | | ||
| mapper-murmur3 | 1.0.0 | | ||
| [`mapper-size`]({{site.url}}{{site.baseurl}}/install-and-configure/additional-plugins/mapper-size-plugin/) | 1.0.0 | | ||
| query-insights | 2.12.0 | | ||
| repository-azure | 1.0.0 | | ||
| repository-gcs | 1.0.0 | | ||
| repository-hdfs | 1.0.0 | | ||
| repository-s3 | 1.0.0 | | ||
| store-smb | 1.0.0 | | ||
| transport-nio | 1.0.0 | | ||
|
||
|
||
## Related articles | ||
[Installing plugins]({{site.url}}{{site.baseurl}}/install-and-configure/plugins/) | ||
[`mapper-size` plugin]({{site.url}}{{site.baseurl}}/install-and-configure/additional-plugins/mapper-size-plugin/) |
100 changes: 100 additions & 0 deletions
100
_install-and-configure/additional-plugins/mapper-size-plugin.md
This file contains 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,100 @@ | ||
--- | ||
layout: default | ||
title: Mapper-size plugin | ||
parent: Installing plugins | ||
nav_order: 20 | ||
|
||
--- | ||
|
||
# Mapper-size plugin | ||
|
||
The `mapper-size` plugin enables the use of the `_size` field in OpenSearch indexes. The `_size` field stores the size, in bytes, of each document. | ||
|
||
## Installing the plugin | ||
|
||
You can install the `mapper-size` plugin using the following command: | ||
|
||
```sh | ||
./bin/opensearch-plugin install mapper-size | ||
``` | ||
|
||
## Examples | ||
|
||
After starting up a cluster, you can create an index with size mapping enabled, index a document, and search for documents, as shown in the following examples. | ||
|
||
### Create an index with size mapping enabled | ||
|
||
```sh | ||
curl -XPUT example-index -H "Content-Type: application/json" -d '{ | ||
"mappings": { | ||
"_size": { | ||
"enabled": true | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "text" | ||
}, | ||
"age": { | ||
"type": "integer" | ||
} | ||
} | ||
} | ||
}' | ||
``` | ||
|
||
### Index a document | ||
|
||
```sh | ||
curl -XPOST example-index/_doc -H "Content-Type: application/json" -d '{ | ||
"name": "John Doe", | ||
"age": 30 | ||
}' | ||
``` | ||
|
||
### Query the index | ||
|
||
```sh | ||
curl -XGET example-index/_search -H "Content-Type: application/json" -d '{ | ||
"query": { | ||
"match_all": {} | ||
}, | ||
"stored_fields": ["_size", "_source"] | ||
}' | ||
``` | ||
|
||
### Query results | ||
|
||
In the following example, the `_size` field is included in the query results and shows the size, in bytes, of the indexed document: | ||
|
||
```json | ||
{ | ||
"took": 2, | ||
"timed_out": false, | ||
"_shards": { | ||
"total": 1, | ||
"successful": 1, | ||
"skipped": 0, | ||
"failed": 0 | ||
}, | ||
"hits": { | ||
"total": { | ||
"value": 1, | ||
"relation": "eq" | ||
}, | ||
"max_score": 1.0, | ||
"hits": [ | ||
{ | ||
"_index": "example_index", | ||
"_id": "Pctw0I8BLto8I5f_NLKK", | ||
"_score": 1.0, | ||
"_size": 37, | ||
"_source": { | ||
"name": "John Doe", | ||
"age": 30 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
This file contains 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