---
Title: Optimize relevance
URL Source: https://company-skill.com/p/opensearch/opensearch-optimize-relevance
Language: en
Description: 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…
---

# Optimize relevance

Part of **OpenSearch**. Route queries via `POST https://company-skill.com/api/route`.

## 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.

## Related queries

improve search relevance, boost search ranking, customize ranking model, configure text scoring, fix tokenization errors, correct NER results, adjust BM25 weights, Pack index setup, vector_source_text field, cate_id field, doc_payload_flag config, has_section_attribute flag, position_payload_flag se

---
Part of [OpenSearch](https://company-skill.com/p/opensearch.md) · https://company-skill.com/llms.txt
