本文档是针对 OpenSearch 的简体中文本地化仓库。包括有 OpenSearch 引擎以及相关的一些插件。仓库中的内容是从官方 GitHub 代码库中 Fork 下来后进行编译和修改的。
Go to file
Eli Fisher 32037c038b Update Java home variable to be correct
updates docs to us `JAVA_HOME`

Signed-off-by: Eli Fisher <elifish@amazon.com>
2022-01-14 14:01:36 -05:00
.github Add support for codeowners to repo 2021-11-12 20:23:23 +00:00
_clients Add logstash-output-opensearch configuration to support data streams 2022-01-06 17:16:23 -06:00
_dashboards Merge pull request #337 from opensearch-project/dashboards-custom-branding 2022-01-06 16:36:15 -08:00
_data Added testimonials and connect 2022-01-03 16:02:32 -08:00
_external_links Update external link to Dashboards developer guide 2021-08-27 12:46:55 -07:00
_im-plugin Tweaked language 2022-01-10 14:25:04 -08:00
_includes added AWS link to footer 2021-11-03 19:35:34 -07:00
_layouts Enhance breadcrumbs and URLs in search results 2021-12-03 12:57:28 -08:00
_monitoring-plugins fix minor description issues on Alerting API doc 2022-01-05 10:46:31 +09:00
_observability Language tweaks 2021-12-15 13:09:58 -08:00
_opensearch Update Java home variable to be correct 2022-01-14 14:01:36 -05:00
_plugins Add indexing of documentation for custom-search 2021-11-19 16:22:49 -08:00
_replication-plugin Clarify stop autofollow behavior 2021-12-09 09:57:06 -08:00
_sass Enhance breadcrumbs and URLs in search results 2021-12-03 12:57:28 -08:00
_search-plugins Merge branch 'main' into index-apis 2022-01-06 11:28:06 -08:00
_security-plugin Separate OpenSearch Dashboards version from that of OpenSearch 2021-12-22 11:27:02 -08:00
_troubleshoot Present tense 2021-10-11 15:28:19 -07:00
_upgrade-to spacing 2021-10-03 10:57:58 -07:00
assets Fix version-selector in Safari 15.x 2021-12-03 16:15:28 -08:00
images Merge pull request #332 from opensearch-project/dashboards-custom-branding 2021-12-20 10:15:16 -08:00
.gitignore Add SSL configuration for Dashboards 2021-07-09 15:33:35 -07:00
404.md Initial documentation cut 2021-05-05 10:09:47 -07:00
CNAME Create CNAME 2021-05-07 12:13:42 -07:00
CODE_OF_CONDUCT.md Initial commit 2021-05-03 10:11:12 -07:00
CONTRIBUTING.md Got a little overzealous 2021-06-09 19:36:03 -07:00
Gemfile Generate a sitemap 2021-08-04 11:51:31 -07:00
LICENSE Initial commit 2021-05-03 10:11:12 -07:00
NOTICE Remove year from copyright 2021-08-09 15:53:52 -07:00
README.md updating points of contact 2021-11-05 11:57:18 -07:00
THIRD-PARTY Initial documentation cut 2021-05-05 10:09:47 -07:00
_config.yml Separate OpenSearch Dashboards version from that of OpenSearch 2021-12-22 11:27:02 -08:00
build.sh Fixes site 2021-05-28 11:19:18 -07:00
check-links.sh No more relative links 2021-06-09 19:15:41 -07:00
favicon.ico Initial documentation cut 2021-05-05 10:09:47 -07:00
favicon.png Initial documentation cut 2021-05-05 10:09:47 -07:00
favicon.svg Initial documentation cut 2021-05-05 10:09:47 -07:00
index.md Added some basic operation to docker quickstart 2021-10-22 11:20:21 -07:00
version-history.md Fixed 1.2.3 release notes link 2022-01-10 16:39:51 -08:00

README.md

OpenSearch documentation

This repository contains the documentation for OpenSearch, the search, analytics, and visualization suite with advanced security, alerting, SQL support, automated index management, deep performance analysis, and more. You can find the rendered documentation at opensearch.org/docs.

Community contributions remain essential in keeping this documentation comprehensive, useful, well-organized, and up-to-date.

How you can help

  • Do you work on one of the various OpenSearch plugins? Take a look at the documentation for the plugin. Is everything accurate? Will anything change in the near future?

    Often, engineering teams can keep existing documentation up-to-date with minimal effort, thus freeing up the documentation team to focus on larger projects.

  • Do you have expertise in a particular area of OpenSearch? Cluster sizing? The query DSL? Painless scripting? Aggregations? JVM settings? Take a look at the current content and see where you can add value. The documentation team is happy to help you polish and organize your drafts.

  • Are you an OpenSearch Dashboards expert? How did you set up your visualizations? Why is a particular dashboard so valuable to your organization? We have very little on how to use OpenSearch Dashboards, only how to install it.

  • Are you a web developer? Do you want to add an optional dark mode to the documentation? A "copy to clipboard" button for our code samples? Other improvements to the design or usability? See major changes for information on building the website locally.

  • Our issue tracker contains documentation bugs and other content gaps, some of which have colorful labels like "good first issue" and "help wanted."

Points of contact

If you encounter problems or have questions when contributing to the documentation, these people can help:

How the website works

This repository contains many Markdown files organized into Jekyll "collections" (e.g. _search-plugins, _opensearch, etc.). Each Markdown file correlates with one page on the website.

Using plain text on GitHub has many advantages:

  • Everything is free, open source, and works on every operating system. Use your favorite text editor, Ruby, Jekyll, and Git.
  • Markdown is easy to learn and looks good in side-by-side diffs.
  • The workflow is no different than contributing code. Make your changes, build locally to check your work, and submit a pull request. Reviewers check the PR before merging.
  • Alternatives like wikis and WordPress are full web applications that require databases and ongoing maintenance. They also have inferior versioning and content review processes compared to Git. Static websites, such as the ones Jekyll produces, are faster, more secure, and more stable.

In addition to the content for a given page, each Markdown file contains some Jekyll front matter. Front matter looks like this:

---
layout: default
title: Alerting security
nav_order: 10
parent: Alerting
has_children: false
---

If you're making trivial changes, you don't have to worry about front matter.

If you want to reorganize content or add new pages, keep an eye on has_children, parent, and nav_order, which define the hierarchy and order of pages in the lefthand navigation. For more information, see the documentation for our upstream Jekyll theme.

Contribute content

There are three ways to contribute content, depending on the magnitude of the change.

Trivial changes

If you just need to fix a typo or add a sentence, this web-based method works well:

  1. On any page in the documentation, click the Edit this page link in the lower-left.

  2. Make your changes.

  3. Choose Create a new branch for this commit and start a pull request and Commit changes.

Minor changes

If you want to add a few paragraphs across multiple files and are comfortable with Git, try this approach:

  1. Fork this repository.

  2. Download GitHub Desktop, install it, and clone your fork.

  3. Navigate to the repository root.

  4. Create a new branch.

  5. Edit the Markdown files in /docs.

  6. Commit, push your changes to your fork, and submit a pull request.

Major changes

If you're making major changes to the documentation and need to see the rendered HTML before submitting a pull request, here's how to build locally:

  1. Fork this repository.

  2. Download GitHub Desktop, install it, and clone your fork.

  3. Navigate to the repository root.

  4. Install Ruby if you don't already have it. We recommend RVM, but use whatever method you prefer:

    curl -sSL https://get.rvm.io | bash -s stable
    rvm install 2.6
    ruby -v
    
  5. Install Jekyll if you don't already have it:

    gem install bundler jekyll
    
  6. Install dependencies:

    bundle install
    
  7. Build:

    sh build.sh
    
  8. If the build script doesn't automatically open your web browser (it should), open http://localhost:4000/docs/.

  9. Create a new branch.

  10. Edit the Markdown files in each collection (e.g. _security-plugin/).

    If you're a web developer, you can customize _layouts/default.html and _sass/custom/custom.scss.

  11. When you save a file, marvel as Jekyll automatically rebuilds the site and refreshes your web browser. This process can take anywhere from 10-30 seconds.

  12. When you're happy with how everything looks, commit, push your changes to your fork, and submit a pull request.

Writing tips

  1. Try to stay consistent with existing content and consistent within your new content. Don't call the same plugin KNN, k-nn, and k-NN in three different places.

  2. Shorter paragraphs are better than longer paragraphs. Use headers, tables, lists, and images to make your content easier for readers to scan.

  3. Use bold for user interface elements, italics for key terms or emphasis, and monospace for Bash commands, file names, REST paths, and code.

  4. Markdown file names should be all lowercase, use hyphens to separate words, and end in .md.

  5. Avoid future tense. Use present tense.

    Bad: After you click the button, the process will start.

    Better: After you click the button, the process starts.

  6. "You" refers to the person reading the page. "We" refers to the OpenSearch contributors.

    Bad: Now that we've finished the configuration, we have a working cluster.

    Better: At this point, you have a working cluster, but we recommend adding dedicated master nodes.

  7. Don't use "this" and "that" to refer to something without adding a noun.

    Bad: This can cause high latencies.

    Better: This additional loading time can cause high latencies.

  8. Use active voice.

    Bad: After the request is sent, the data is added to the index.

    Better: After you send the request, the OpenSearch cluster indexes the data.

  9. Introduce acronyms before using them.

    Bad: Reducing customer TTV should accelerate our ROIC.

    Better: Reducing customer time to value (TTV) should accelerate our return on invested capital (ROIC).

  10. Spell out one through nine. Start using numerals at 10. If a number needs a unit (GB, pounds, millimeters, kg, celsius, etc.), use numerals, even if the number if smaller than 10.

    Bad: 3 kids looked for thirteen files on a six GB hard drive.

    Better: Three kids looked for 13 files on a 6 GB hard drive.

New releases

  1. Branch.

  2. Change the opensearch_version, opensearch_major_minor_version, and lucene_version variables in _config.yml.

  3. Start up a new cluster using the updated Docker Compose file in docs/install/docker.md.

  4. Update the version table in version-history.md.

    Use curl -XGET https://localhost:9200 -u admin:admin -k to verify the OpenSearch and Lucene versions.

  5. Update the plugin compatibility table in _opensearch/install/plugin.md.

    Use curl -XGET https://localhost:9200/_cat/plugins -u admin:admin -k to get the correct version strings.

  6. Update the plugin compatibility table in _dashboards/install/plugins.md.

    Use docker ps to find the ID for the OpenSearch Dashboards node. Then use docker exec -it <opensearch-dashboards-node-id> /bin/bash to get shell access. Finally, run ./bin/opensearch-dashboards-plugin list to get the plugins and version strings.

  7. Run a build (build.sh), and look for any warnings or errors you introduced.

  8. Verify that the individual plugin download links in docs/install/plugins.md and docs/opensearch-dashboards/plugins.md work.

  9. Check for any other bad links (check-links.sh). Expect a few false positives for the localhost links.

  10. Submit a PR.

Classes within Markdown

This documentation uses a modified version of the just-the-docs Jekyll theme, which has some useful classes for labels and buttons:

[Get started](#get-started){: .btn .btn-blue }

## Get started
New
{: .label .label-green }
  • Labels come in default (blue), green, purple, yellow, and red.
  • Buttons come in default, purple, blue, green, and outline.
  • Warning, tip, and note blocks are available ({: .warning }, etc.).
  • If an image has a white background, you can use {: .img-border } to add a one pixel border to the image.

These classes can help with readability, but should be used sparingly. Each addition of a class damages the portability of the Markdown files and makes moving to a different Jekyll theme (or a different static site generator) more difficult.

Besides, standard Markdown elements suffice for most documentation.

Labels for APIs

Each API operation has a label indicating when it was introduced. For most operations, this label is 1.0:

## Get roles
Introduced 1.0
{: .label .label-purple }

If we introduce a breaking change to an operation, add an additional label with a link to the release note for that breaking change:

## Get roles
Introduced 1.0
{: .label .label-purple }
[Last breaking change 2.0](https://example.com)
{: .label .label-red }

Math

If you want to use the sorts of pretty formulas that MathJax allows, add has_math: true to the Jekyll page metadata. Then insert LaTeX math into HTML tags with the rest of your Markdown content:

## Math

Some Markdown paragraph. Here's a formula:

<p>
  When \(a \ne 0\), there are two solutions to \(ax^2 + bx + c = 0\) and they are
  \[x = {-b \pm \sqrt{b^2-4ac} \over 2a}.\]
</p>

And back to Markdown.

Code of conduct

This project has adopted an Open Source Code of Conduct.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Copyright OpenSearch contributors.