← 返回命令列表

Linux command

opensearch 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Start OpenSearch

opensearch

Start with specific config

opensearch -E path.data=[/data] -E path.logs=[/logs]

Run as a daemon (background)

opensearch -d

Check cluster health

curl -XGET "http://localhost:9200/_cluster/health?pretty"

Index a document

curl -XPOST "http://localhost:9200/[index]/_doc" -H 'Content-Type: application/json' -d '{"field":"value"}'

说明

OpenSearch is an open-source search and analytics engine derived from Elasticsearch 7.10.2. It provides full-text search, logging, and analytics capabilities. OpenSearch includes OpenSearch Dashboards (forked from Kibana) for visualization.

参数

-d
Run as a daemon (in the background).
-p _file_
Write the process ID to file.
-E _setting=value_
Set a configuration setting (e.g., -E cluster.name=myCluster).
-q, --quiet
Suppress normal output to stdout.
-v, --verbose
Enable verbose output.

FAQ

What is the opensearch command used for?

OpenSearch is an open-source search and analytics engine derived from Elasticsearch 7.10.2. It provides full-text search, logging, and analytics capabilities. OpenSearch includes OpenSearch Dashboards (forked from Kibana) for visualization.

How do I run a basic opensearch example?

Run `opensearch` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -d do in opensearch?

Run as a daemon (in the background).