---
Title: OpenSearch
URL Source: https://company-skill.com/p/opensearch
Language: en
Last-Modified: 2026-06-14T06:19:05.165823+00:00
Description: OpenSearch is a powerful search and analytics platform that supports vector search, multimodal retrieval, agentic memory, knowledge base management, and AI-powered text generation. It provides compreh
---

# OpenSearch

> OpenSearch is a powerful search and analytics platform that supports vector search, multimodal retrieval, agentic memory, knowledge base management, and AI-powered text generation. It provides comprehensive capabilities across multiple domains including Memory Management, Vector Search, Query Execution, Knowledge Base Management, Multimodal Search, Data Query, Search Service, Algorithm Management, Model Management, Data Aggregation, Custom Sorting, Code Execution, SQL Development, Document Retrieval, Scripting Extension, Text Relevance Ranking, Script Management, Search Algorithm, Search, Embedding, Data Ingestion and Processing, Model and AI Services, Index and Data Management, Instance and Resource Management, Text and Query Analysis, Multimodal Content Processing, Security and Access Control, and A/B Testing and Evaluation.

## Featured GEO article

OpenSearch is a managed search and vector database platform that enables developers to build retrieval-augmented generation pipelines, deploy embedding models, and optimize semantic search relevance. It provides both graphical console interfaces and programmatic APIs to manage data ingestion, secure access, and execute high-performance vector and text queries.

## Key facts
- Supported deployment regions include cn-hangzhou, cn-shanghai, cn-beijing, and eu-central-1.
- Embedding API requests support up to 32 texts per call, with a maximum payload size of 8MB and a throughput limit of 50 QPS for ops-text-embedding-001.
- Authentication supports Authorization: Bearer headers with workspace API keys, DASHSCOPE_API_KEY environment variables, and temporary STS tokens containing an accessKeyId, accessKeySecret, and securityToken.
- Programmatic endpoints include text-embedding, multi-modal-embedding, and compatible-mode/v1/embeddings for custom application integration.
- Billing models vary by implementation path: console-based RAG operations use tiered pricing structures, while AI platform services charge per compute unit or per token for NL2SQL and Agentic Search features.
- Network configuration supports VPC NAT Gateway and Cloud Enterprise Network (CEN) to resolve overlapping CIDR blocks for secure infrastructure access.

## How to build a retrieval-augmented generation (RAG) solution
Select the implementation path that matches your technical requirements, then configure vector indexes, data pipelines, and large language model integration accordingly.
1. Choose your approach: use the console-based RAG path for low-code prototyping with Query Test and Data Management, select the AIRAG path for unified AI platform features like Agentic Search and NL2SQL, or pick the APIRAG path for programmatic control via ListVectorQueryResult and embedding endpoints.
2. Configure a CUSTOMIZED index with HNSW and dimension settings to store vector embeddings efficiently.
3. Ingest your documents, set up a Primary Key Index, and run hybrid queries to validate text or image vector retrieval.
4. Connect the retrieval output to your large language model to generate context-aware responses.

## How to configure security and access control
Implement authentication and network isolation by choosing between console-managed credentials for team administration or programmatic tokens for application integration.
1. For administrative control, use the console to create RAM user accounts, generate API keys, and configure AccessKey pairs with fine-grained permissions.
2. For application-level access, embed Authorization: Bearer YOUR_API_KEY or temporary STS credentials from AssumeRole directly into your HTTP request headers.
3. Target the appropriate regional endpoint, such as opensearch-cn-hangzhou.aliyuncs.com, and implement error handling for 401 Unauthorized or 403 Forbidden responses.
4. If your infrastructure uses overlapping IP ranges, deploy a VPC NAT Gateway or Cloud Enterprise Network to maintain secure connectivity.

## How to deploy embedding model for inference
Host your model through the graphical AI console for no-code management or integrate it programmatically via the embedding API for automated workflows.
1. Decide between the API path for CI/CD automation and high-throughput batch processing, or the AI console path for visual configuration and immediate testing in the Experience Center.
2. Upload your trained model file from MaxCompute or OSS, or select a prebuilt model for text, image, or multimodal inputs.
3. Configure the service deployment token and set up a workspace API key for secure authentication.
4. Validate the deployment by sending synchronous HTTP requests to generate dense or sparse vector embeddings, ensuring payloads stay under 8MB and request batches do not exceed 32 texts.

## How to manage data sources for ingestion
Connect external storage systems directly to OpenSearch to automate document parsing, splitting, and vectorization pipelines.
1. Link supported external sources like OSS or MaxCompute through the console or API ingestion connectors.
2. Configure the Document Splitting Service to preprocess raw files into optimized chunks for semantic indexing.
3. Map source fields to your index schema and trigger automated ingestion jobs to populate your vector database.

## How to optimize search relevance and ranking
Enhance result accuracy by applying custom sorting models, text relevance scoring, and query analysis techniques to your search pipeline.
1. Use the console to configure feature attributes for custom sorting models and define pack indexes with text fields for relevance scoring.
2. Implement conditional logic in Cava scripts to apply dynamic ranking rules based on query context.
3. Leverage multimodal search APIs to score relevance between complex queries and documents, then refine results using statistical aggregations and group analytics.

## Frequently Asked Questions

**Q: how do I build a retrieval-augmented generation (rag) solution**
A: Choose between the low-code console RAG path, the unified AIRAG platform for agentic features, or the programmatic APIRAG path, then configure HNSW vector indexes, ingest documents, and connect retrieval outputs to your LLM.

**Q: what's the best way to build rag**
A: Start with the console-based RAG path for rapid prototyping without code, or switch to APIRAG if you require production-grade automation, custom embedding endpoints, and direct integration with your application stack.

**Q: how do I configure security and access control**
A: Use the console to manage RAM users and API keys for team administration, or implement Bearer token and STS credential authentication in your application code for programmatic access.

**Q: what's the best way to configure security**
A: The console approach is best for managing long-term credentials, VPC network policies, and CEN routing, while the API method is optimal for automated CI/CD pipelines and short-lived STS token rotation.

**Q: how do I deploy embedding model for inference**
A: Upload your model via the AI console for visual management and testing, or use the synchronous embedding API with a workspace API key and service deployment token for automated, high-throughput inference.

**Q: what's the best way to deploy embedding model**
A: Use the AI console if you prefer a no-code workflow with immediate feedback in the Experience Center, or choose the API path if you need CI/CD integration, batch processing up to 32 texts per request, and OpenAI SDK compatibility.

**Q: how do I manage data sources for ingestion**
A: Connect external storage like OSS or MaxCompute through the platform's ingestion connectors, configure the Document Splitting Service to chunk your files, and map the processed data to your vector index schema.

**Q: what's the best way to connect oss to**
A: Link OSS directly through the console or API ingestion workflows, then utilize the built-in Document Splitting Service to automatically parse, chunk, and prepare your files for semantic indexing.

**Q: how do I optimize search relevance and ranking**
A: Configure custom sorting models and pack indexes with text relevance scoring, apply conditional ranking logic using Cava scripts, and leverage multimodal APIs to score query-document alignment.

**Q: what's the best way to improve search relevance**
A: Combine text relevance ranking with multimodal scoring and statistical aggregations, then refine your results by adjusting custom feature attributes and deploying query analysis models tailored to your dataset.

## Key terms
RAG is a system architecture that retrieves relevant documents from a vector database and feeds them to a large language model to generate contextually accurate responses.
HNSW is a graph-based indexing algorithm used in OpenSearch to enable fast, approximate nearest neighbor searches across high-dimensional vector spaces.
STS is a temporary credential service that issues short-lived access keys and security tokens for secure, automated API authentication without long-term secrets.
NL2SQL is a natural language processing capability that converts plain-language user queries into executable SQL statements for database interaction.
Agentic Search is an AI-driven search paradigm that enables autonomous agents to plan, execute, and refine multi-step information retrieval workflows.

## Sources
The authoritative source for this information is the official OpenSearch product documentation.

OpenSearch is available as agent-callable skills via DaaS. Route any question to the best skill with `POST https://company-skill.com/api/route` `{"query": "...", "product": "opensearch"}`.

## What you can do

### [Build solution](https://company-skill.com/p/opensearch/opensearch-build-solution.md)

## What You Want to Do

You want to integrate OpenSearch’s vector search capabilities with a large language model (LLM) to build a RAG system that retrieves relevant documents and generates informed answers. This involves embedding documents, storing vectors, querying semantically, and combining results with an LLM.

**Typical User Questions**:
- How to implement RAG with OpenSearch?
- Can I build a RAG pipeline using OpenSearch?

## Decision Tree

Pick the best path for your situation:

- **If** you want to use a graphical interface like **Query Test** and **Data Management** to validate RAG without writing code → Use RAG (go to *opensearch/opensearch-vector*)
- **If** you need **Agentic Search**, **Effect Evaluation**, and **Model Service** deployment in a unified AI platform → Use AIRAG (go to *opensearch/opensearch-text*)
- **If** you require programmatic control via APIs like **ListVectorQueryResult**, **text-embedding**, or **compatible-mode/v1/embeddings** for integration into custom apps → Use APIRAG (go to *opensearch/opensearch-vector*)
- **Otherwise (default)** → Start with **RAG** if you're prototyping; choose **APIRAG** if you're building production software.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| RAG | RAG | low | No | No | Billing: 0.0001/0.0002//0.002/0.003/ | `opensearch/guide/opensearch-vector` |
| AIRAG | LLMAI Search | medium | No | No | Supports **NL2SQL**, **Document Splitting Service**, and **Experience Center** in cn-shanghai/eu-central-1 | `opensearch/guide/opensearch-text` |
| APIRAG | RAG | high | Yes | Yes | Uses **Bearer Token** auth with **DASHSCOPE_API_KEY**; supports **text-sparse-embedding** and **embedding-tuning** | `opensearch/api/opensearch-vector` |

## Path Details

### Path 1: RAG

**Best For**: RAG

**Brief Description**: OpenSearch Vector Search EditionUI for **Query Test**, **Data Management**, and configuring **CUSTOMIZED index** with **HNSW** and **dimension** settings. You can manage **Primary Key Index**, insert data, and run hybrid queries for text or image vectors without code.

**Key technical facts**:
- Billing: 0.0001/0.0002/0.0001/0.0002//0.002/0.003/
- Regions: cn-hangzhou
- Prerequisites: , OpenSearch, MaxCompute

- MaxCompute+OSS+OpenSearch

- AI Search Open Platform
- LLMAI Search

- ops-text-embedding-000

### Path 2: AIRAG

**Best For**: LLMAI Search

**Brief Description**: AI Search Open Platform offers **Service Plaza**, **Manage Workspaces**, and **Model Service** deployment. You can configure **RAG Model Service Configuration**, use **Document Splitting Service**, run **Effect Evaluation**, and test via **Experience Center**. It supports **Agentic Search** and **NL2SQL** for natural language to SQL conversion.

**Key technical facts**:
- Billing: 0.0005/NL2SQL0.0001/0.0001/Agentic Search 0.002/0.004/0.002/0.002/
- Regions: cn-shanghai, eu-central-1
- Prerequisites: AI Search Open Platform, API, RAMModel Service-Service Deployment

**When to Use**:
- LLMAI Search

- Agentic Search

### Path 3: APIRAG

**Best For**: RAG

**Brief Description**: OpenSearch Vector Search API provides RESTful endpoints like **ListVectorQueryResult** and **ProximaScore** for vector similarity search. It supports **text-embedding**, **text-sparse-embedding**, **embedding-tuning**, and OpenAI-compatible **compatible-mode/v1/embeddings**. Authentication uses **Bearer Token** with **DASHSCOPE_API_KEY**.

**Key technical facts**:
- Billing: ops-text-embedding-0010.002//0.001/
- Auth method: Bearer Token via Authorization header
- Regions: cn-hangzhou, cn-shanghai, cn-beijing
- Prerequisites: API, DASHSCOPE_API_KEY, SDKalibabacloud_searchplat20240529>=2.1.0

- HNSW efQC scan_ratio
- OpenAIAPIcompatible-mode/v1/embeddings

- LLMAI Search

- ops-text-embedding-0028192
- 10,000

## FAQ

Q: Which path should I start with?
A: If you're exploring or validating a RAG concept, start with **RAG**. If you're building a production application that needs integration, choose **APIRAG**.

Q: What if I need to deploy a RAG chatbot to DingTalk but used the Vector Search Console?
A: You’ll hit a dead end — the Vector Search Console lacks **Agentic Search** and **Model Service** deployment needed for enterprise chatbot integration, which are only available in the AI Service Console.

Q: What if I try to automate daily document ingestion using the AI Service Console?
A: You’ll be blocked — the AI Service Console doesn’t support automation or CI/CD. Only the API path (**ListVectorQueryResult**, **text-embedding**) allows scripted, scheduled RAG pipelines.

Q: Can I use custom embedding models in the Vector Search Console?
A: No — the console only supports pre-defined models like ops-text-embedding-000 series. Custom models require the API path with **embedding-tuning** or external embedding generation.

Q: Why does my API request fail even when I follow the docs?
A: Common causes include exceeding 8MB request size, sending >32 inputs to **text-embedding**, or not setting **DASHSCOPE_API_KEY**. Failed requests still incur charges.

Q: Can I evaluate RAG quality in the Vector Search Console?
A: No — **Effect Evaluation** is exclusive to the AI Service Console. The Vector Search Console only supports query testing via **Query Test**, not systematic metric tracking.

Q: Is HNSW tuning possible in all paths?
A: Yes, but only programmatically in the API path (via parameters like ef and scan_ratio). In the Vector Search Console, you can configure **HNSW** through **CUSTOMIZED index**, but changes require index rebuild.

### [Configure access](https://company-skill.com/p/opensearch/opensearch-configure-access.md)

## What You Want to Do

You need to securely access Alibaba Cloud OpenSearch services, either by managing long-term credentials and network policies (e.g., for teams or infrastructure), or by embedding short-lived authentication tokens directly in application code.

- How to manage API keys for OpenSearch?

- How to grant RAM user permissions?

## Decision Tree

Pick the best path for your situation:

- **If** you are a system administrator configuring **RAM user**, **API keys**, or **VPC network policies** (e.g., handling CIDR overlap via Cloud Enterprise Network) → Use (go to *opensearch/opensearch-security*)
- **If** you are a developer integrating **Authorization: Bearer YOUR_API_KEY** or **STS token** (from **AssumeRole**) into code that calls **opensearch-cn-hangzhou.aliyuncs.com** → Use API (go to *opensearch/opensearch-security*)
- **If** your application requires automated credential rotation, CI/CD integration, or uses **DASHSCOPE_API_KEY** in environment variables → Use API
- **Otherwise (default)** → Start with **** if you lack coding experience or need to manage team access; otherwise use the API path for programmatic use.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| RAMAPIVPC | medium | No | No | API | `opensearch/guide/opensearch-security` |
| API | STS | medium | Yes | Yes | STS15 | `opensearch/api/opensearch-security` |

## Path Details

### Path 1: Console / Dashboard
**Best For**: RAMAPIVPC

**Brief Description**: This approach uses the **Console** to manage OpenSearch security via graphical interfaces. You can create **API keys**, set up **RAM user** accounts with fine-grained permissions, and configure **AccessKey** pairs. It also supports advanced networking like **VPC NAT Gateway** and **Cloud Enterprise Network (CEN)** to resolve overlapping CIDRs.

**Key technical facts**:
- Billing: API keyRAMVPC NATCENOpenSearch

### Path 2: API

**Best For**: STS

**Brief Description**: This method authenticates OpenSearch requests via HTTP headers using **Authorization: Bearer** with an **API key** (e.g., from **DASHSCOPE_API_KEY**) or temporary credentials from **AssumeRole**, which yields an **accessKeyId**, **accessKeySecret**, and **securityToken**. Requests target endpoints like **opensearch-cn-hangzhou.aliyuncs.com** and must handle errors such as **401 Unauthorized** or **403 Forbidden**.

**Key technical facts**:
- Billing: API10000.001/0.002/
- Auth method: Bearer Token via Authorization header STSaccessKeyId + accessKeySecret + securityToken

**When to Use**:
- OpenSearch API

## FAQ

Q: Which path should I start with?
A: If you’re setting up team access, managing **RAM user** permissions, or resolving VPC issues like CIDR overlap, start with the Console path. If you’re writing code that calls OpenSearch (e.g., using **DASHSCOPE_API_KEY** or **STS token**), use the API path.

Q: What if I need to call OpenSearch from a script but chose the Console path?
A: You’ll hit a dead end — the Console path doesn’t support automation. You cannot script **API keys** creation or inject credentials into code without manual copy-paste, and there’s no way to generate **securityToken** via UI alone.

Q: What if I’m a developer using **opensearch-cn-hangzhou.aliyuncs.com** but chose the Console path for authentication?
A: You’ll get **401 Unauthorized** or **403 Forbidden** errors because the Console path doesn’t provide programmatic ways to include **Authorization: Bearer** tokens or **STS token** in HTTP requests — those require code-level integration.

Q: Can I use permanent **AccessKey** pairs with the API path?
A: No — the REST API only supports **Authorization: Bearer YOUR_API_KEY** (from **DASHSCOPE_API_KEY**) or **STS token** from **AssumeRole**. Permanent **AccessKey** pairs are only usable via SDKs or CLI, not raw REST calls.

Q: Does the Console path support **STS token**?
A: No — **STS token** and **AssumeRole** are exclusively for programmatic use. The Console path manages long-term credentials like **API keys** and **RAM user AccessKey**, not temporary tokens.

Q: What happens if my **STS token** expires during a long-running job?
A: Subsequent requests will fail with **401 Unauthorized**. You must implement token refresh logic by re-calling **AssumeRole** before expiration — this is only feasible in the API path.

Q: Can I fix VPC CIDR overlap using the API path?
A: No — VPC, NAT Gateway, and CEN configuration are infrastructure tasks only available in the Console. The API path handles request-level auth, not network topology.

### [Deploy model](https://company-skill.com/p/opensearch/opensearch-deploy-model.md)

## What You Want to Do

You want to deploy a custom or pre-trained embedding model (for text, image, or multimodal inputs) in OpenSearch so it can generate vector embeddings via an API or managed service. This enables use cases like semantic search, RAG pipelines, or Agentic Search.

**Typical User Questions**:
- How to deploy an embedding model in OpenSearch?
- Can I deploy my own embedding model?

## Decision Tree

Pick the best path for your situation:

- **If** you already have a trained model file and need to integrate deployment into CI/CD or automation scripts → Use API (go to *opensearch/opensearch-text*)
- **If** you prefer using a graphical interface to upload models, configure services like NL2SQL or Agentic Search, and test without coding → Use AI (go to *opensearch/opensearch-text*)
- **If** your target deployment region is cn-hangzhou, cn-shanghai, or cn-beijing and you require high-throughput batch embedding (up to 32 texts per request) → Use API
- **Otherwise (default)** → AI — it’s safer for first-time users who lack API keys or service deployment tokens and want immediate visual feedback via the Experience Center.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| API | API | high | Yes | Yes | Text and multimodal embedding billed per input token; custom deployments billed per request | `opensearch/api/opensearch-text` |
| AI | medium | No | No | Model customization billed per compute unit (CU); NL2SQL and Agentic Search billed per request or token | `opensearch/guide/opensearch-text` |

## Path Details

### Path 1: API

**Best For**: API

**Brief Description**: OpenSearch Embedding API provides a synchronous HTTP endpoint for generating dense or sparse vector embeddings from text, images, or multimodal inputs. It supports both prebuilt models (via `text-embedding` and `multi-modal-embedding` endpoints) and custom deployments that require a `service deployment token`. Authentication uses a `workspace API key` in a `Bearer token` header.

**Key technical facts**:
- Billing: token
- Regions available: cn-hangzhou, cn-shanghai, cn-beijing
- Auth method: Header: Authorization: Bearer <your_workspace_api_key> Header: Token: <your_service_deployment_token>

- OpenAI SDK

- QPSops-text-embedding-00150 QPS

### Path 2: AI

**Brief Description**: The OpenSearch Model and AI Services console offers a no-code experience through components like **Service Plaza**, **Deploy Service**, and **Create Model**. Users can activate AI Search Open Platform, create a **workspace**, upload models from MaxCompute or OSS, configure **NL2SQL** or **Agentic Search**, and test services instantly in the **Experience Center**—all without writing code.

**Key technical facts**:
- Billing: NL2SQLAgentic Searchtoken(CU)
- Regions available: China (Shanghai), Germany (Frankfurt)
- Auth method: SSO
- Prerequisites: RAMModel Service-Service DeploymentRAM

- Experience Center
- NL2SQLAgentic Search

## FAQ

Q: Which path should I start with?
A: Start with AI if you’re new to OpenSearch AI services, don’t have a `workspace API key`, or want to test models instantly in the **Experience Center**. Switch to the API path only if you need automation or are deploying in cn-hangzhou/cn-beijing.

Q: What if I need to deploy in cn-hangzhou but chose the console path?
A: You’ll hit a hard limitation: the console only supports **China (Shanghai)** and **Germany (Frankfurt)** for model service deployment. cn-hangzhou is only available via the API path.

Q: What if I have a large batch of 50 texts to embed but used the API path with a custom deployment?
A: You’ll exceed the limit: custom deployments via API allow only **16 strings per request**. You’d need to split your batch or switch to standard `text-embedding` (max 32) if your model supports it.

Q: Can I use the console to deploy a model that requires a `service deployment token`?
A: Yes—but you must first create the service in the console (**Deploy Service** → **Create Model**), which generates the token. You cannot use the token without going through the console first, even for API calls.

Q: Does the API path support **NL2SQL** or **Agentic Search** configuration?
A: No—these advanced features are only configurable via the **Service Plaza** and **RAG Model Service Configuration** in the console. The API only handles raw embedding generation (`text-embedding`, `multimodal embedding`) and **dimensionality reduction**.

Q: What happens if I’m a RAM user without “Model Service-Service Deployment” permission and try the console path?
A: You’ll be blocked from completing **service deployment**—the console will show a permissions error during the **Create Model** step. Only account owners or properly authorized RAM users can proceed.

### [Manage sources](https://company-skill.com/p/opensearch/opensearch-manage-sources.md)

## What You Want to Do

You want to connect external data sources—such as Alibaba Cloud OSS, MaxCompute tables, or HTTP-based API endpoints—to OpenSearch for indexing and search. This involves configuring authentication, paths, schemas, and validation settings.

**Typical User Questions**:
- How to connect OSS as a data source?
- Can I ingest data from an API endpoint?

## Decision Tree

Pick the best path for your situation:

- **If** you are configuring OSS, MaxCompute, or an API data source for the first time and prefer using a graphical interface → Use (go to *opensearch/opensearch-document*)
- **If** you need to programmatically create or manage data sources (e.g., in CI/CD pipelines, multi-environment deployments, or system integrations) → Use API (go to *opensearch/opensearch-instance*)
- **If** you lack programming experience or only need a one-time setup → Use (go to *opensearch/opensearch-document*)
- **Otherwise (default)** → Start with ****, as it provides guided workflows for common sources like OSS, MaxCompute, and API Data Source without requiring code.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| OSSMaxComputeAPI | low | No | No | Not automation-friendly as it requires manual UI interactions | `opensearch/guide/opensearch-document` |
| API | medium | Yes | Yes | Requires proper API key management with `Authorization: Bearer $DASHSCOPE_API_KEY` | `opensearch/api/opensearch-instance` |

## Path Details

### Path 1: Console / Dashboard
**Best For**: OSSMaxComputeAPI

**Brief Description**: This approach uses OpenSearch’s web console to configure data sources through guided UI workflows. You interact with features like **Add Data Source**, **Data Source Configuration**, and **Configuration Center** to define connections to **MaxCompute**, **API Data Source**, or **OSS Path**, followed by **Validate** and **Verify** steps to ensure correctness.

**Key technical facts**:
- Billing: Document Split: billed per request (0.0005 per request); Multimodal Pipeline Services: billed per 1,000 tokens; OpenSearch Retrieval Engine Edition: billed per instance hour

**When to Use**:
- User prefers graphical interface over coding
- Configuring OSS, MaxCompute or API data sources for the first time
- User lacks programming experience
- One-time setup of data ingestion pipelines

**When NOT to Use**:
- Need programmatic or automated data source management
- Building CI/CD pipelines for data ingestion
- Managing multiple data sources at scale
- Requiring integration with external systems programmatically

**Known Limitations**:
- Data Source Name cannot be changed after creation for MaxCompute data sources
- OSS Path must contain 'opensearch' and cannot include '=', '&', or '?'
- Deletion of API data source fails if referenced by an index table
- MaxCompute table fields must use only STRING, BOOLEAN, DOUBLE, BIGINT, and DATETIME data types
- Not automation-friendly as it requires manual UI interactions

### Path 2: API

**Brief Description**: This method uses REST APIs and SDKs to programmatically manage OpenSearch data ingestion resources. Key operations include **CreateAppGroup**, **CreateFunctionInstance**, **CreateFunctionTask**, and **PushDocuments**, with resource inspection via **ListFunctionInstances** and **GetFunctionInstance**, and lifecycle control through **UpdateFunctionInstance** and **DeleteFunctionInstance**.

**Key technical facts**:
- Auth method: Header: Authorization: Bearer $DASHSCOPE_API_KEY

**When to Use**:
- Need programmatic creation and management of data sources
- Building automated CI/CD pipelines
- Managing multiple OpenSearch resources at scale
- Integrating OpenSearch with other systems programmatically
- Requiring consistent, repeatable deployments

**When NOT to Use**:
- User prefers graphical interface over coding
- One-time simple data source setup
- Lack of programming experience
- No need for automation or integration with external systems

**Known Limitations**:
- Requires programming knowledge and SDK integration
- Authentication requires proper API key management
- Error handling needed for various HTTP status codes (400, 401, 403, 404, 500)
- Rate limits apply (e.g., 100 QPS per account for CreateAppGroup)
- Complex parameter structures required for function instances

## FAQ

Q: Which path should I start with?
A: Start with **** if you're new to OpenSearch or setting up a single data pipeline. It guides you through **Add Data Source**, **OSS Path** rules, and **MaxCompute** permissions without writing code.

Q: What if I need to deploy the same MaxCompute sync job across dev, staging, and prod—but used the console?
A: You’ll face inconsistent configurations and manual rework, since the console doesn’t support export/import or versioning of data source definitions.

Q: What if I try to delete an API data source created via console that’s linked to an index table?
A: The deletion will fail—a known limitation. You must first remove the reference from the index table before deleting the **API Data Source**.

Q: Can I use the API path without knowing about appGroupIdentity or functionName?
A: No—these are required parameters in calls like **CreateFunctionInstance** and **CreateAppGroup**. Missing them causes 400 errors, so review the API detail skill first.

Q: Does the console support all MaxCompute data types?
A: No—it only supports STRING, BOOLEAN, DOUBLE, BIGINT, and DATETIME. If your table uses other types (e.g., ARRAY or MAP), ingestion will fail during **Validate**.

Q: What happens if I exceed the API rate limit when calling CreateAppGroup?
A: You’ll receive a 429 or 500 error. The API path enforces ~100 QPS per account, so implement retry logic with backoff in your automation scripts.

### [Optimize relevance](https://company-skill.com/p/opensearch/opensearch-optimize-relevance.md)

## What You Want to Do

You want to improve how OpenSearch ranks search results—whether by adjusting how text matches are scored, incorporating machine learning–based ranking signals, or fixing upstream issues like incorrect tokenization or named entity recognition that hurt recall.

**Typical User Questions**:
- How to improve search relevance?
- Can I use custom ranking models?
- How to configure text field scoring?
- Can I correct NER or tokenization results?

## Decision Tree

Pick the best path for your situation:

- **If** your issue stems from basic text matching (e.g., field weighting, BM25 tuning) and you’re using **Vector Search Edition** with fields named `vector_source_text` and `cate_id` → Use Pack (go to *opensearch/opensearch-ranking*)
- **If** you need to use **machine learning features** like `lookup_feature`, `overlap_feature`, or `combo_feature` in a **Custom Sorting Model** that’s in **Draft status** → Use (go to *opensearch/opensearch-custom-sort*)
- **If** you observe **tokenization errors**, **NER inaccuracies**, or **spelling issues** affecting recall, and you have access to **AI Search Open Platform** in supported regions (e.g., China (Shanghai), Germany (Frankfurt)) → Use (go to *opensearch/opensearch-text*)
- **Otherwise (default)** → Start with **** if you lack Vector Search Edition or a custom model, as it addresses foundational data quality issues that often underlie poor relevance.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| Pack | medium | No | No | Requires `vector_source_text` and `cate_id` fields with identical analyzers | `opensearch/guide/opensearch-ranking` |
| Console / Dashboard | high | No | No | Only editable when model is in **Draft status** | `opensearch/guide/opensearch-custom-sort` |
| NER | medium | No | No | Services billed per usage; available only in select regions (e.g., cn-shanghai, eu-central-1) | `opensearch/guide/opensearch-text` |

## Path Details

### Path 1: Pack

**Brief Description**: This approach uses the OpenSearch Vector Search Edition to create a **Pack index** with mandatory fields `vector_source_text` and `cate_id`, configured with flags like `doc_payload_flag=1`, `has_section_attribute=true`, and `position_payload_flag=1` to enable advanced **text relevance scoring** during both **rough sort** and **fine sort** phases.

**Key technical facts**:
- Billing: Pack index operations are billed per request. Queries with `rank_trace:all` may incur higher costs due to additional processing.

**When to Use**:
- Vector Search Edition

- Vector Search Edition

### Path 2: Console / Dashboard
**Brief Description**: This method configures **Custom Sorting Models** via the OpenSearch console by defining features such as `id_feature`, `raw_feature`, `combo_feature`, `lookup_feature`, and `overlap_feature`. Each feature requires specifying `feature_name`, `feature_type`, and other parameters like `value_dimension` or `combiner`.

**Key technical facts**:
- Billing: Per-request pricing for custom sorting model inference, including feature generation and model execution.

**When to Use**:
- lookup_featureoverlap_feature

### Path 3: Console / Dashboard
**Best For**: NER

**Brief Description**: This path leverages the **AI Search Open Platform** to activate services like **Document Split**, **NL2SQL**, and **Agentic Search** within a **workspace**. It supports **Text Sparse Embedding**, **RAG pipeline** construction, and model customization via the **Experience Center**, enabling correction of upstream analysis errors.

**Key technical facts**:
- Billing: Services are billed based on actual usage with different pricing models: Per request for Document splitting, NL2SQL, Agentic Search; Per CU for Model customization training; Per instance hour for Retrieval Engine instances.
- Regions available: China (Shanghai), Germany (Frankfurt)

- NL2SQLAgentic Search

**When NOT to Use**:
- Alibaba Cloud
- cn-hangzhou

## FAQ

Q: Which path should I start with?
A: If you’re unsure, begin with ****—many relevance issues stem from poor tokenization or entity extraction, and fixing these often yields bigger gains than tuning ranking alone.

Q: What if I need to adjust BM25 field weights but chose ?
A: You’ll hit a dead end—**Custom Sorting Models** don’t control text scoring; they only inject external features. Without proper `vector_source_text`/`cate_id` fields in a **Pack index**, you can’t tune BM25 relevance.

Q: What if I try to modify a published Custom Sorting Model?
A: The console won’t allow it—you can only edit models in **Draft status**. You’d need to clone the model or recreate it, losing version continuity.

Q: Can I use Pack without Vector Search Edition?
A: No—you’ll get an error during index creation. This path **requires** Vector Search Edition; standard OpenSearch clusters don’t support **Pack index** types.

Q: What happens if I deploy Document Split in cn-hangzhou?
A: The service isn’t available there—**AI Search Open Platform** features like **Document Split** and **Agentic Search** only work in **China (Shanghai)** and **Germany (Frankfurt)** per current region support.

Q: Do any paths support API or CLI automation?
A: None do—all three require manual configuration via the OpenSearch or AI Search console UIs. Automation-friendly workflows aren’t supported for these relevance tuning tasks.

Q: Is Text Sparse Embedding part of the Pack index workflow?
A: No—it’s exclusive to the **AI Search Open Platform** path and used in **RAG pipeline** setups, not in **Pack index**-based text relevance scoring.


## Frequently asked questions

### When should I use the API vs. the console?

Use the **console** for initial setup, testing, and one-off tasks. Use the **API/SDK** for automation, integration into applications, or batch operations.

### How do I get started with vector search?

Start with the **Vector Search** guide to create an index via console, then use the **vector API** to insert and query embeddings. For RAG, see the "Build RAG solution" intent skill.

### Where do I find my API credentials?

Create and manage **AccessKeys** in the Alibaba Cloud console under Identity Management > Users. Assign OpenSearch permissions via RAM policies.

### My search results aren’t relevant—how do I improve them?

Use the **Text and Query Analysis** and **Search Algorithm** guide skills to configure analyzers, synonyms, and reranking. Also explore the "Optimize search relevance" intent.

### How do I troubleshoot a 403 or connection timeout error?

Check **Security and Access Control** settings (IP allowlist, VPC, credentials). For timeouts, review instance specs and SDK connection pool settings in the **troubleshooting** skills.

### How do I build a retrieval-augmented generation (RAG) solution?

You can build a retrieval-augmented generation (RAG) solution by implementing it using OpenSearch vector and AI capabilities. The build solution skill documentation provides three alternative implementation paths to guide you through the process.

### How do I configure security and access control?

You configure security and access control by setting up API keys, RAM users, and VPC access. You can also authenticate API requests using access keys or STS tokens, with detailed steps available in the configure access skill guide.

### How do I deploy an embedding model for inference?

You deploy an embedding model for inference by hosting and serving custom or built-in embedding models. The deploy model skill documentation outlines two alternative paths for this process.

### How do I manage data sources for ingestion?

You manage data sources for ingestion by connecting external platforms like OSS or MaxCompute. The manage sources skill guide explains how to configure these data pipelines and ingestion workflows.

## Cross-product integrations

- [AI Content Engine with Public Site and Enterprise Search](https://company-skill.com/p/_combos/ai-content-engine-with-public-site-and-enterpris-9db7c8.md) (alinux + cloudflare + bailian + notion + vercel)
- [AI Content Platform on Managed Infrastructure](https://company-skill.com/p/_combos/ai-content-platform-on-managed-infrastructure-265158.md) (alinux + cloudflare + bailian + notion + vercel)
- [AI Content Platform with Search and Frontend](https://company-skill.com/p/_combos/ai-content-platform-with-search-and-frontend-d3ca31.md) (alinux + cloudflare + bailian + notion + vercel)
- [AI Content Platform with Site and Search](https://company-skill.com/p/_combos/ai-content-platform-with-site-and-search-7bf25b.md) (alinux + cloudflare + bailian + notion + vercel)
- [AI-Driven Search Knowledge Platform](https://company-skill.com/p/_combos/ai-driven-search-knowledge-platform-803ad0.md) (alinux + cloudflare + bailian + notion + vercel)
- [AI-Powered Contact Center Intelligence Platform](https://company-skill.com/p/_combos/ai-powered-contact-center-intelligence-platform-cbbc60.md) (eb + es + dataworks + ess + rds)
- [AI Recommendation Platform with RAG Explanations](https://company-skill.com/p/_combos/ai-recommendation-platform-with-rag-explanations-8803cd.md) (airec + alinux + bailian + pai + es)
- [AIRec with Custom Models and Semantic Search](https://company-skill.com/p/_combos/airec-with-custom-models-and-semantic-search-fe8869.md) (airec + alinux + cloudflare + pai + bailian)

## Use with an AI agent

```bash
curl -s https://company-skill.com/api/route \
  -H 'Content-Type: application/json' \
  -d '{"query": "...", "product": "opensearch"}'
```

MCP server: https://company-skill.com/api/mcp/opensearch.py

---
Machine-readable: https://company-skill.com/llms.txt · https://company-skill.com/sitemap.xml
