Skip to content

solutions for opensearch#128

Open
chideat wants to merge 4 commits intomainfrom
os-kb
Open

solutions for opensearch#128
chideat wants to merge 4 commits intomainfrom
os-kb

Conversation

@chideat
Copy link
Collaborator

@chideat chideat commented Mar 4, 2026

  1. add guide for disabling SSL with opensearch-operator
  2. add guide for IK Analyzer plugin installation with opensearch-operator

Summary by CodeRabbit

  • Documentation
    • New guide: Installing IK Analyzer plugin for OpenSearch via opensearch-operator.
    • Details installation flows, required configuration, and rolling restart behavior.
    • Provides YAML deployment examples and apply/verification commands for OpenSearch 2.19.3 and 3.3.1.
    • Shows tokenizer tests, index mapping usage, optional custom-dictionary mounting, air-gapped support, and troubleshooting notes.

Copilot AI review requested due to automatic review settings March 4, 2026 14:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds two new OpenSearch solution guides under docs/en/solutions/ecosystem/opensearch, focused on common opensearch-operator operational tasks (plugin installation and TLS/SSL disabling).

Changes:

  • Add a step-by-step guide to install the IK Analyzer plugin via pluginsList (including bootstrap and optional custom dictionary mounting).
  • Add a guide explaining how to disable TLS on the HTTP layer and/or transport layer for operator-managed OpenSearch clusters.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

File Description
docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md New documentation covering IK Analyzer installation, verification, and usage examples.
docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md New documentation covering disabling TLS on HTTP/transport and Dashboards connectivity updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

Walkthrough

A new documentation file was added describing how to install and configure the IK Analyzer plugin for OpenSearch using the opensearch-operator, including YAML samples, verification steps, tokenizer tests, custom dictionary mounting, air‑gapped guidance, and download URLs for OpenSearch 2.19.3 and 3.3.1.

Changes

Cohort / File(s) Summary
OpenSearch IK Analyzer Installation Guide
docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md
Added new comprehensive documentation covering installation via spec.general.pluginsList and spec.bootstrap.pluginsList, required configs, rolling restart notes, download URLs for versions 2.19.3 and 3.3.1, YAML deployment samples, verification commands, tokenizer tests, index mapping examples, custom dictionary via ConfigMap, and air‑gapped environment guidance.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • tyzhou111
  • shibalu

Poem

🐰 I bounced through docs with a hop and a twitch,
IK tokens arranged without a glitch,
YAML and URLs stacked neat in a row,
Tokenizers sing when the indices go,
Hooray for plugins — let searchers grow! 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'solutions for opensearch' is too vague and generic, failing to identify the specific changes being added (SSL disabling guide and IK Analyzer plugin installation guide). Use a more specific title that describes the main additions, such as 'Add guides for SSL disabling and IK Analyzer plugin installation for opensearch-operator' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch os-kb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md`:
- Around line 84-85: Replace hardcoded credentials in the curl examples that use
"curl -u admin:admin http://localhost:9200/..." with a safer pattern: use a
placeholder or environment variable (e.g., curl -u "$ES_USER:$ES_PASS"
http://localhost:9200/... or curl -u ${OPENSEARCH_USER}:${OPENSEARCH_PASS}) and
update the surrounding text to show how to set those env vars (export
OPENSEARCH_USER=admin; export OPENSEARCH_PASS=secret) or reference a .env file;
update both occurrences of the curl example (the block containing "curl -u
admin:admin ...") so examples no longer include plaintext credentials.
- Line 142: Update the compatibility phrasing that currently reads "3.3.0 for
OpenSearch 3.x" to the narrower "3.3.0 for OpenSearch 3.3.x" (occurrences around
the version declaration and the other instance) so the docs reflect major.minor
alignment; edit the lines that include `version: 2.19.3  # or 3.3.0 for
OpenSearch 3.x` and the second occurrence at the later compatibility note to
instead say `3.3.0 for OpenSearch 3.3.x` (or add a link to the OpenSearch
Dashboards compatibility matrix) to prevent implying compatibility with all 3.x
releases.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`:
- Around line 180-185: Replace the hardcoded basic-auth credentials in the curl
examples (the curl POST "_analyze" example and the other examples reported) with
environment variable placeholders instead of "admin:admin"; add a short preface
before the examples instructing users to export OPENSEARCH_USER and
OPENSEARCH_PASS (or use placeholders) and update the curl command invocations to
reference those env vars (e.g., use "$OPENSEARCH_USER:$OPENSEARCH_PASS" or a
placeholder like "<OPENSEARCH_USER>:<OPENSEARCH_PASS>") so no plaintext
credentials are embedded in the documentation.
- Line 141: Replace the hardcoded YAML line "version: 3.3.0" with either the
matching OpenSearch Dashboards release "version: 3.3.1" or change it to
version-agnostic guidance: remove the fixed version and add a sentence pointing
readers to the official OpenSearch release notes
(https://opensearch.org/releases/) to choose the matching Dashboards version;
target the "version: 3.3.0" token in this doc when making the edit.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9342f275-71ec-439a-85ab-cd7d22da4dad

📥 Commits

Reviewing files that changed from the base of the PR and between 1d56f46 and be397c5.

📒 Files selected for processing (2)
  • docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md
  • docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md

Comment on lines +84 to +85
curl -u admin:admin http://localhost:9200/_cluster/health?pretty
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use placeholders/env vars instead of hardcoded credentials in examples.

Line 84 and Line 211 hardcode admin:admin. This is risky in published operational docs and encourages insecure copy/paste behavior.

Suggested safer command pattern
- curl -u admin:admin http://localhost:9200/_cluster/health?pretty
+ curl -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" http://localhost:9200/_cluster/health?pretty

Also applies to: 211-212

🧰 Tools
🪛 Gitleaks (8.30.0)

[high] 84-84: Discovered a potential basic authorization token provided in a curl command, which could compromise the curl accessed resource.

(curl-auth-user)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md`
around lines 84 - 85, Replace hardcoded credentials in the curl examples that
use "curl -u admin:admin http://localhost:9200/..." with a safer pattern: use a
placeholder or environment variable (e.g., curl -u "$ES_USER:$ES_PASS"
http://localhost:9200/... or curl -u ${OPENSEARCH_USER}:${OPENSEARCH_PASS}) and
update the surrounding text to show how to set those env vars (export
OPENSEARCH_USER=admin; export OPENSEARCH_PASS=secret) or reference a .env file;
update both occurrences of the curl example (the block containing "curl -u
admin:admin ...") so examples no longer include plaintext credentials.

spec:
dashboards:
enable: true
version: 2.19.3 # or 3.3.0 for OpenSearch 3.x
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md | sed -n '138,148p'

Repository: alauda/knowledge

Length of output: 495


🏁 Script executed:

cat -n docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md | sed -n '183,193p'

Repository: alauda/knowledge

Length of output: 467


🌐 Web query:

OpenSearch Dashboards 3.3.0 compatibility matrix OpenSearch versions official

💡 Result:

Official compatibility (OpenSearch Dashboards 3.3.0 → OpenSearch versions):

  • OpenSearch 3.3.0 (OpenSearch 3.3.0 release notes state it’s “Compatible with OpenSearch and OpenSearch Dashboards version 3.3.0”). [1]
  • OpenSearch 3.3.2 (OpenSearch 3.3.2 release notes state it’s “Compatible with OpenSearch 3.3.2 and OpenSearch Dashboards 3.3.0”). [2]

Rule of thumb from the official docs: OpenSearch Dashboards is expected to match the OpenSearch major/minor version (docs give the example “OpenSearch Dashboards 2.3.0 works with OpenSearch 2.3.0”). [3]

So, practically: OpenSearch Dashboards 3.3.0 is intended for OpenSearch 3.3.x (explicitly confirmed for 3.3.0 and 3.3.2 in official release notes). [1] [2]

Sources
[1] OpenSearch 3.3.0 GitHub release notes (opensearch-project/OpenSearch)
[2] OpenSearch 3.3.2 GitHub release notes (opensearch-project/OpenSearch)
[3] OpenSearch Docs: “Managing OpenSearch Dashboards plugins” (compatibility/prerequisites section)


🌐 Web query:

OpenSearch official compatibility between Dashboards 3.3.0 and OpenSearch 3.x versions

💡 Result:

Officially, OpenSearch Dashboards 3.3.0 is intended to run with the corresponding OpenSearch version (same major/minor)—i.e., OpenSearch 3.3.x, not OpenSearch 3.0/3.1/3.2 or 3.4+. The OpenSearch docs state that you should use the corresponding version of Dashboards with your OpenSearch cluster (example given: Dashboards 2.3.0 with OpenSearch 2.3.0). [1]

Confirmed explicit compat statements involving Dashboards 3.3.0:

  • OpenSearch 3.3.0 ↔ OpenSearch Dashboards 3.3.0 (OpenSearch 3.3.0 release notes). [2]
  • OpenSearch 3.3.1 ↔ OpenSearch Dashboards 3.3.0 (consolidated 3.3.1 release notes). [3]
  • OpenSearch 3.3.2 ↔ OpenSearch Dashboards 3.3.0 (OpenSearch 3.3.2 release notes). [2]

Compatibility summary (Dashboards 3.3.0):

OpenSearch version Officially compatible?
3.0.x / 3.1.x / 3.2.x No (version mismatch; use corresponding minor) [1]
3.3.0 Yes [2]
3.3.1 Yes [3]
3.3.2 Yes [2]
3.4.x / 3.5.x No (upgrade Dashboards to 3.4.x / 3.5.x respectively) [2]

Sources

  1. OpenSearch Docs – “Managing OpenSearch Dashboards plugins” (prerequisites: corresponding Dashboards version matches OpenSearch; example 2.3.0 ↔ 2.3.0). [1]
  2. OpenSearch GitHub Releases – 3.3.0 (“Compatible with OpenSearch and OpenSearch Dashboards version 3.3.0”) and 3.3.2 (“Compatible with OpenSearch 3.3.2 and OpenSearch Dashboards 3.3.0”). [2]
  3. opensearch-build consolidated release notes – “OpenSearch 3.3.1 and OpenSearch Dashboards 3.3.0 Release Notes”. [3]

Narrow the compatibility statement from 3.3.0 for OpenSearch 3.x to 3.3.0 for OpenSearch 3.3.x.

Lines 142 and 187 use overly broad phrasing. Official OpenSearch Dashboards compatibility requires major.minor version alignment—Dashboards 3.3.0 only works with OpenSearch 3.3.0, 3.3.1, and 3.3.2, not all OpenSearch 3.x versions. As OpenSearch 3.4+ is released, the current phrasing will become misleading. Recommend updating to 3.3.0 for OpenSearch 3.3.x or linking to the official OpenSearch Dashboards compatibility matrix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Disable_SSL_for_OpenSearch_Deployed_by_opensearch-operator.md`
at line 142, Update the compatibility phrasing that currently reads "3.3.0 for
OpenSearch 3.x" to the narrower "3.3.0 for OpenSearch 3.3.x" (occurrences around
the version declaration and the other instance) so the docs reflect major.minor
alignment; edit the lines that include `version: 2.19.3  # or 3.3.0 for
OpenSearch 3.x` and the second occurrence at the later compatibility note to
instead say `3.3.0 for OpenSearch 3.3.x` (or add a link to the OpenSearch
Dashboards compatibility matrix) to prevent implying compatibility with all 3.x
releases.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (2)
docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md (2)

151-151: ⚠️ Potential issue | 🟡 Minor

Avoid hardcoding “latest compatible” version claims.

Line 151 states 3.3.0 is the latest compatible Dashboards version; this ages quickly and can become incorrect. Prefer version-agnostic guidance (match Dashboards to your OpenSearch release, and reference official release notes).

Suggested doc update
-    version: 3.3.0  # Dashboards 3.3.0 is the latest release compatible with OpenSearch 3.3.1
+    version: 3.3.1  # Use the matching Dashboards version for your OpenSearch release
+> Tip: Always pick the Dashboards version that matches your OpenSearch version.  
+> Check: https://opensearch.org/releases/
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`
at line 151, Replace the hardcoded “version: 3.3.0” Dashboards claim with
version-agnostic guidance: remove the explicit version value and instead
instruct readers to use the Dashboards release that matches their OpenSearch
release (e.g., "match Dashboards to your OpenSearch version") and to consult the
official OpenSearch and Dashboards release notes/compatibility matrix for the
exact compatible version; update the sentence that currently reads `version:
3.3.0  # Dashboards 3.3.0 is the latest release compatible with OpenSearch
3.3.1` to a generic recommendation referencing matching releases and checking
official release notes.

190-190: ⚠️ Potential issue | 🟠 Major

Remove embedded admin:admin credentials from command examples.

Line 190, Line 227, and Line 259 publish default plaintext credentials. Use environment variables/placeholders so users don’t copy insecure defaults.

Suggested secure doc pattern
+export OPENSEARCH_USER=admin
+export OPENSEARCH_PASS='<your-password>'
-curl -k -u admin:admin -X POST "https://localhost:9200/_analyze" \
+curl -k -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" -X POST "https://localhost:9200/_analyze" \
-curl -k -u admin:admin -X POST "https://localhost:9200/_analyze" \
+curl -k -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" -X POST "https://localhost:9200/_analyze" \
-curl -k -u admin:admin -X PUT "https://localhost:9200/my-index" \
+curl -k -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" -X PUT "https://localhost:9200/my-index" \

Also applies to: 227-227, 259-259

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`
at line 190, Remove the embedded plaintext credentials in the curl examples
(e.g., the occurrence of "curl -k -u admin:admin -X POST
\"https://localhost:9200/_analyze\"") and replace them with a secure placeholder
or environment-variable form such as using "$OPENSEARCH_USER:$OPENSEARCH_PASS"
or "{USERNAME}:{PASSWORD}" so users must supply credentials; update all other
similar examples in the same file (the other curl lines that embed admin:admin)
to use the same placeholder/ENV pattern and ensure any explanatory text
references setting those environment variables instead of showing defaults.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`:
- Line 151: Replace the hardcoded “version: 3.3.0” Dashboards claim with
version-agnostic guidance: remove the explicit version value and instead
instruct readers to use the Dashboards release that matches their OpenSearch
release (e.g., "match Dashboards to your OpenSearch version") and to consult the
official OpenSearch and Dashboards release notes/compatibility matrix for the
exact compatible version; update the sentence that currently reads `version:
3.3.0  # Dashboards 3.3.0 is the latest release compatible with OpenSearch
3.3.1` to a generic recommendation referencing matching releases and checking
official release notes.
- Line 190: Remove the embedded plaintext credentials in the curl examples
(e.g., the occurrence of "curl -k -u admin:admin -X POST
\"https://localhost:9200/_analyze\"") and replace them with a secure placeholder
or environment-variable form such as using "$OPENSEARCH_USER:$OPENSEARCH_PASS"
or "{USERNAME}:{PASSWORD}" so users must supply credentials; update all other
similar examples in the same file (the other curl lines that embed admin:admin)
to use the same placeholder/ENV pattern and ensure any explanatory text
references setting those environment variables instead of showing defaults.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 254f8bfd-0218-45ce-972b-00aafbed50cb

📥 Commits

Reviewing files that changed from the base of the PR and between be397c5 and 4292bec.

📒 Files selected for processing (1)
  • docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chideat chideat deployed to translate March 5, 2026 14:42 — with GitHub Actions Active
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md (2)

151-151: ⚠️ Potential issue | 🟡 Minor

Avoid “latest compatible” hardcoding in the Dashboards version comment.

Line 151 uses time-sensitive wording (latest release compatible), which becomes stale quickly. Prefer version-agnostic guidance (for example, “use the matching Dashboards release for your OpenSearch version” and link to official releases).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`
at line 151, Replace the time-sensitive comment on the Dashboards version (the
line containing "version: 3.3.0  # Dashboards 3.3.0 is the latest release
compatible with OpenSearch 3.3.1") with a version-agnostic instruction: state to
"use the Dashboards release that matches your OpenSearch version" and optionally
add a link to the official OpenSearch releases page; keep the explicit numeric
"version: 3.3.0" value only if it’s an example, and update the inline comment to
something like "use the matching Dashboards release for your OpenSearch version
(see official releases)" instead of "latest release compatible".

190-190: ⚠️ Potential issue | 🟠 Major

Remove hardcoded admin:admin from command examples.

Line 190, Line 227, and Line 259 still embed credentials in plaintext. Please switch to env vars/placeholders so users don’t copy insecure defaults.

Suggested doc-safe patch
+export OPENSEARCH_USER=admin
+export OPENSEARCH_PASS='<your-password>'
...
-curl -k -u admin:admin -X POST "https://localhost:9200/_analyze" \
+curl -k -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" -X POST "https://localhost:9200/_analyze" \
...
-curl -k -u admin:admin -X POST "https://localhost:9200/_analyze" \
+curl -k -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" -X POST "https://localhost:9200/_analyze" \
...
-curl -k -u admin:admin -X PUT "https://localhost:9200/my-index" \
+curl -k -u "${OPENSEARCH_USER}:${OPENSEARCH_PASS}" -X PUT "https://localhost:9200/my-index" \

Also applies to: 227-227, 259-259

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`
at line 190, Replace the hardcoded credentials in the curl examples (e.g., the
string "curl -k -u admin:admin -X POST \"https://localhost:9200/_analyze\"" and
the other occurrences using admin:admin) with a safe placeholder or
environment-variable reference such as "$OPENSEARCH_USER:$OPENSEARCH_PASS" or
"{USERNAME}:{PASSWORD}"; update all instances (the lines shown and the other two
occurrences) so examples use the placeholder/env var and add a brief note
telling users to set those env vars before running the command.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`:
- Around line 265-270: The analyzer entries under settings.analysis.analyzer
(ik_max_word_analyzer and ik_smart_analyzer) are invalid because "type":
"ik_max_word" / "ik_smart" are not valid analyzer types; replace them with
proper custom analyzer definitions that specify "type": "custom" and set the
"tokenizer" to "ik_max_word" and "ik_smart" respectively (and any needed
filters), or alternatively remove those analyzer blocks and reference the
built-in ik_max_word and ik_smart analyzers directly from your field mappings;
update the ik_max_word_analyzer and ik_smart_analyzer definitions accordingly so
index creation will succeed.

---

Duplicate comments:
In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`:
- Line 151: Replace the time-sensitive comment on the Dashboards version (the
line containing "version: 3.3.0  # Dashboards 3.3.0 is the latest release
compatible with OpenSearch 3.3.1") with a version-agnostic instruction: state to
"use the Dashboards release that matches your OpenSearch version" and optionally
add a link to the official OpenSearch releases page; keep the explicit numeric
"version: 3.3.0" value only if it’s an example, and update the inline comment to
something like "use the matching Dashboards release for your OpenSearch version
(see official releases)" instead of "latest release compatible".
- Line 190: Replace the hardcoded credentials in the curl examples (e.g., the
string "curl -k -u admin:admin -X POST \"https://localhost:9200/_analyze\"" and
the other occurrences using admin:admin) with a safe placeholder or
environment-variable reference such as "$OPENSEARCH_USER:$OPENSEARCH_PASS" or
"{USERNAME}:{PASSWORD}"; update all instances (the lines shown and the other two
occurrences) so examples use the placeholder/env var and add a brief note
telling users to set those env vars before running the command.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c2245979-bf80-4112-b2a3-21cb9bd6b047

📥 Commits

Reviewing files that changed from the base of the PR and between dd8a700 and 4a4ac2c.

📒 Files selected for processing (1)
  • docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md

Comment on lines +265 to +270
"ik_max_word_analyzer": {
"type": "ik_max_word"
},
"ik_smart_analyzer": {
"type": "ik_smart"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

OpenSearch IK Analyzer plugin analyzer type configuration ik_max_word ik_smart tokenizer

💡 Result:

In the OpenSearch IK Analysis plugin, ik_smart and ik_max_word are provided as both analyzer names and tokenizer names. You can use them either directly in field mappings, or inside a custom analyzer definition. [1]

1) Use IK directly in mappings (simplest)

PUT my_index
{
  "mappings": {
    "properties": {
      "content": {
        "type": "text",
        "analyzer": "ik_max_word",
        "search_analyzer": "ik_smart"
      }
    }
  }
}

ik_smart = coarser “smart” segmentation; ik_max_word = finest-grained segmentation. [2]

2) Use IK as the tokenizer in a custom analyzer (when you need filters)

PUT my_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "my_ik": {
          "type": "custom",
          "tokenizer": "ik_max_word",
          "filter": ["lowercase"]
        }
      }
    }
  },
  "mappings": {
    "properties": {
      "content": { "type": "text", "analyzer": "my_ik" }
    }
  }
}

OpenSearch custom analyzers are built from a tokenizer plus optional char/token filters. [3]

3) Quick validation

POST my_index/_analyze
{
  "analyzer": "ik_max_word",
  "text": "计算机汉字输入法"
}

[2]

Sources: [1] [2] [3]


Invalid IK Analyzer type in settings definition.

In settings.analysis.analyzer, "type": "ik_max_word" and "type": "ik_smart" are not valid analyzer types. The ik_max_word and ik_smart are pre-built analyzers you can reference directly in field mappings, or tokenizers that must be wrapped in a custom analyzer. Using them as type values will cause index creation to fail.

Correct configuration
 "settings": {
   "analysis": {
     "analyzer": {
       "ik_max_word_analyzer": {
-        "type": "ik_max_word"
+        "type": "custom",
+        "tokenizer": "ik_max_word"
       },
       "ik_smart_analyzer": {
-        "type": "ik_smart"
+        "type": "custom",
+        "tokenizer": "ik_smart"
       }
     }
   }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"ik_max_word_analyzer": {
"type": "ik_max_word"
},
"ik_smart_analyzer": {
"type": "ik_smart"
}
"ik_max_word_analyzer": {
"type": "custom",
"tokenizer": "ik_max_word"
},
"ik_smart_analyzer": {
"type": "custom",
"tokenizer": "ik_smart"
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@docs/en/solutions/ecosystem/opensearch/How_to_Install_IK_Analyzer_Plugin_for_OpenSearch_with_opensearch-operator.md`
around lines 265 - 270, The analyzer entries under settings.analysis.analyzer
(ik_max_word_analyzer and ik_smart_analyzer) are invalid because "type":
"ik_max_word" / "ik_smart" are not valid analyzer types; replace them with
proper custom analyzer definitions that specify "type": "custom" and set the
"tokenizer" to "ik_max_word" and "ik_smart" respectively (and any needed
filters), or alternatively remove those analyzer blocks and reference the
built-in ik_max_word and ik_smart analyzers directly from your field mappings;
update the ik_max_word_analyzer and ik_smart_analyzer definitions accordingly so
index creation will succeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants