Skip to content
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

[DOCS] Replace 'elasticsearch' that used as plain text in the code snippets #249

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ buildRestTests.setups['messages'] = '''
refresh: true
body: |
{"index":{"_id": "0"}}
{"message": "trying out Elasticsearch"}
{"message": "trying out OpenSearch"}
{"index":{"_id": "1"}}
{"message": "some message with the number 1"}
{"index":{"_id": "2"}}
Expand Down Expand Up @@ -321,6 +321,7 @@ buildRestTests.doFirst {
buildRestTests.setups['bank'].replace('#bank_data#', accounts)
}

// TODO: Replace the setup code of 'stackoverflow' and 'news' for OpenSearch
Copy link
Contributor

@setiah setiah Mar 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO(OpenSearch) instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it's a good idea! I will replace TODO with TODO(OpenSearch), and simplify the message after the colon:

// Used by sampler and diversified-sampler aggregation docs
buildRestTests.setups['stackoverflow'] = '''
- do:
Expand Down
6 changes: 3 additions & 3 deletions docs/plugins/analysis-icu.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ PUT icu_sample
GET icu_sample/_analyze
{
"analyzer": "my_analyzer",
"text": "Elasticsearch. Wow!"
"text": "OpenSearch. Wow!"
}
--------------------------------------------------

Expand All @@ -187,9 +187,9 @@ The above `analyze` request returns the following:
{
"tokens": [
{
"token": "Elasticsearch. Wow!",
"token": "OpenSearch. Wow!",
"start_offset": 0,
"end_offset": 19,
"end_offset": 16,
"type": "<ALPHANUM>",
"position": 0
}
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/analysis-smartcn.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ This filter only supports the predefined `_smartcn_` stopwords list.
If you want to use a different predefined list, then use the
{ref}/analysis-stop-tokenfilter.html[`stop` token filter] instead.

// TODO: Replace the example for OpenSearch
[source,console]
--------------------------------------------------
PUT smartcn_example
Expand Down
1 change: 1 addition & 0 deletions docs/plugins/mapper-annotated-text.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ PUT my-index-000001

Applications would then typically provide content and discover it as follows:

// TODO: Replace the example for OpenSearch
[source,console]
--------------------------
# Example documents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ number of documents collected on any one shard which share a common value. The d
The aggregation will throw an error if the choice of `field` or `script` produces multiple values for a single document (de-duplication using multi-valued fields is not supported due to efficiency concerns).


// TODO: Replace the examples for OpenSearch
Example:

We might want to see which tags are strongly associated with `#elasticsearch` on StackOverflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ A filtering aggregation used to limit any sub aggregations' processing to a samp
* Reducing the running cost of aggregations that can produce useful results using only samples e.g. `significant_terms`


// TODO: Replace the examples for OpenSearch
Example:

A query on StackOverflow data for the popular term `javascript` OR the rarer term
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Filtering near-duplicate text is a difficult task at index-time but we can clean
`filter_duplicate_text` setting.


// TODO: Replace the example for OpenSearch
First let's look at an unfiltered real-world example using the https://research.signalmedia.co/newsir16/signal-dataset.html[Signal media dataset] of
a million news articles covering a wide variety of news. Here are the raw significant text results for a search for the articles
mentioning "elasticsearch":
Expand Down
18 changes: 9 additions & 9 deletions docs/reference/commands/node-tool.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ command to find and remove excess shard data:
----
node$ ./bin/elasticsearch-node repurpose

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

Found 2 shards in 2 indices to clean up
Use -v to see list of paths and indices affected
Expand All @@ -389,7 +389,7 @@ command to find and remove excess shard data and index metadata:
----
node$./bin/elasticsearch-node repurpose

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

Found 2 indices (2 shards and 2 index meta data) to clean up
Use -v to see list of paths and indices affected
Expand All @@ -410,7 +410,7 @@ you can run the following commands to remove one or more cluster settings.
----
node$ ./bin/elasticsearch-node remove-settings xpack.monitoring.exporters.my_exporter.host

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

The following settings will be removed:
xpack.monitoring.exporters.my_exporter.host: "10.1.2.3"
Expand Down Expand Up @@ -444,7 +444,7 @@ commands to remove this custom metadata.
----
node$ ./bin/elasticsearch-node remove-customs snapshot_lifecycle

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

The following customs will be removed:
snapshot_lifecycle
Expand Down Expand Up @@ -473,7 +473,7 @@ lost three of them, leaving two nodes remaining.
----
node_1$ ./bin/elasticsearch-node unsafe-bootstrap

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

Current node cluster state (term, version) pair is (4, 12)

Expand All @@ -496,7 +496,7 @@ Confirm [y/N] n
----
node_2$ ./bin/elasticsearch-node unsafe-bootstrap

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

Current node cluster state (term, version) pair is (5, 3)

Expand All @@ -519,7 +519,7 @@ Confirm [y/N] n
----
node_2$ ./bin/elasticsearch-node unsafe-bootstrap

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

Current node cluster state (term, version) pair is (5, 3)

Expand Down Expand Up @@ -547,7 +547,7 @@ so they can join the new cluster:
----
node_3$ ./bin/elasticsearch-node detach-cluster

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

You should only run this tool if you have permanently lost all of the
master-eligible nodes in this cluster and you cannot restore the cluster
Expand All @@ -573,7 +573,7 @@ with the data stored in the data path:
----
node$ ./bin/elasticsearch-node override-version

WARNING: Elasticsearch MUST be stopped before running this tool.
WARNING: OpenSearch MUST be stopped before running this tool.

This data path was last written by Elasticsearch version [x.x.x] and may no
longer be compatible with Elasticsearch version [y.y.y]. This tool will bypass
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/how-to/recipes/scoring.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ GET index/_search
"query": {
"script_score": {
"query": {
"match": { "body": "elasticsearch" }
"match": { "body": "opensearch" }
},
"script": {
"source": "_score * saturation(doc['pagerank'].value, 10)" <1>
Expand Down Expand Up @@ -171,7 +171,7 @@ GET _search
"query": {
"bool": {
"must": {
"match": { "body": "elasticsearch" }
"match": { "body": "opensearch" }
},
"should": {
"rank_feature": {
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/mapping/types/array.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ are supported out of the box:
PUT my-index-000001/_doc/1
{
"message": "some arrays in this document...",
"tags": [ "elasticsearch", "wow" ], <1>
"tags": [ "opensearch", "wow" ], <1>
"lists": [ <2>
{
"name": "prog_list",
Expand All @@ -59,7 +59,7 @@ PUT my-index-000001/_doc/1
PUT my-index-000001/_doc/2 <3>
{
"message": "no arrays in this document...",
"tags": "elasticsearch",
"tags": "opensearch",
"lists": {
"name": "prog_list",
"description": "programming list"
Expand All @@ -70,7 +70,7 @@ GET my-index-000001/_search
{
"query": {
"match": {
"tags": "elasticsearch" <4>
"tags": "opensearch" <4>
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/query-dsl/function-score-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ GET /_search
"query": {
"function_score": {
"query": {
"match": { "message": "elasticsearch" }
"match": { "message": "opensearch" }
},
"script_score": {
"script": {
Expand Down Expand Up @@ -178,7 +178,7 @@ GET /_search
"query": {
"function_score": {
"query": {
"match": { "message": "elasticsearch" }
"match": { "message": "opensearch" }
},
"script_score": {
"script": {
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/query-dsl/has-parent-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ GET /my-index-000001/_search
"query": {
"term": {
"tag": {
"value": "Elasticsearch"
"value": "OpenSearch"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/query-dsl/query_filter_context.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GET /_search
"bool": { <2>
"must": [
{ "match": { "title": "Search" }},
{ "match": { "content": "Elasticsearch" }}
{ "match": { "content": "OpenSearch" }}
],
"filter": [ <3>
{ "term": { "status": "published" }},
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/query-dsl/script-score-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ GET /_search
"query": {
"script_score": {
"query": {
"match": { "message": "elasticsearch" }
"match": { "message": "opensearch" }
},
"script": {
"source": "doc['my-int'].value / 10 "
Expand Down Expand Up @@ -347,7 +347,7 @@ GET /my-index-000001/_explain/0
"query": {
"script_score": {
"query": {
"match": { "message": "elasticsearch" }
"match": { "message": "opensearch" }
},
"script": {
"source": """
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/search/explain.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ query.
GET /my-index-000001/_explain/0
{
"query" : {
"match" : { "message" : "elasticsearch" }
"match" : { "message" : "opensearch" }
}
}
--------------------------------------------------
Expand Down Expand Up @@ -91,7 +91,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=query]
GET /my-index-000001/_explain/0
{
"query" : {
"match" : { "message" : "elasticsearch" }
"match" : { "message" : "opensearch" }
}
}
--------------------------------------------------
Expand All @@ -109,7 +109,7 @@ The API returns the following response:
"matched":true,
"explanation":{
"value":1.6943598,
"description":"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:",
"description":"weight(message:opensearch in 0) [PerFieldSimilarity], result of:",
"details":[
{
"value":1.6943598,
Expand Down
12 changes: 6 additions & 6 deletions docs/reference/search/suggesters.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ POST my-index-000001/_search
{
"query" : {
"match": {
"message": "tring out Elasticsearch"
"message": "tring out OpenSearch"
}
},
"suggest" : {
"my-suggestion" : {
"text" : "tring out Elasticsearch",
"text" : "tring out OpenSearch",
"term" : {
"field" : "message"
}
Expand Down Expand Up @@ -53,7 +53,7 @@ POST _search
{
"suggest": {
"my-suggest-1" : {
"text" : "tring out Elasticsearch",
"text" : "tring out OpenSearch",
"term" : {
"field" : "message"
}
Expand Down Expand Up @@ -95,9 +95,9 @@ in the suggest text and if found an arbitrary number of options.
"length": 3,
"options": []
}, {
"text": "elasticsearch",
"text": "opensearch",
"offset": 10,
"length": 13,
"length": 10,
"options": []
} ],
"my-suggest-2": ...
Expand Down Expand Up @@ -128,7 +128,7 @@ and applies to the `my-suggest-1` and `my-suggest-2` suggestions.
POST _search
{
"suggest": {
"text" : "tring out Elasticsearch",
"text" : "tring out OpenSearch",
"my-suggest-1" : {
"term" : {
"field" : "message"
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/setup/install/rpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ ifeval::["{release-state}"=="released"]

["source","sh",subs="attributes,callouts"]
--------------------------------------------------
[elasticsearch]
name=Elasticsearch repository for {major-version} packages
[opensearch]
name=OpenSearch repository for {major-version} packages
baseurl=https://artifacts.elastic.co/packages/{major-version}/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
Expand All @@ -64,8 +64,8 @@ ifeval::["{release-state}"=="prerelease"]

["source","sh",subs="attributes,callouts"]
--------------------------------------------------
[elasticsearch]
name=Elasticsearch repository for {major-version} packages
[opensearch]
name=OpenSearch repository for {major-version} packages
baseurl=https://artifacts.elastic.co/packages/{major-version}-prerelease/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
Expand Down