# opensearch-custom-sort

Part of **OPENSEARCH**

<!-- intent-backlink:auto -->

> 💡 **Path Selection**: This skill is one implementation path for [Optimize search relevance and ranking](../../intent/opensearch-optimize-relevance/SKILL.md). If you're unsure which path to take, check the routing skill first.

# OpenSearch Custom Sorting Model Configuration Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|------|-----------|---------|------|
| Configure Custom Sorting Model Features | Console > Elasticsearch > Custom Sorting Models > Configure Features | A custom sorting model must be created, Access to the Elasticsearch console, Understanding of field types and data formats | Set up feature configuration attributes such as id_feature, raw_feature, combo_feature, lookup_feature, and overlap_feature for a custom sorting model |

## Operation Steps

### Configure Custom Sorting Model Features

**Navigation**: Console > Elasticsearch > Custom Sorting Models > Configure Features

**Prerequisites**:
- A custom sorting model must be created
- Access to the Elasticsearch console
- Understanding of field types and data formats

1. Navigate to the Custom Sorting Models section in the Elasticsearch console  
   - Element: **Custom Sorting Models** (link) — left navigation panel  
   - Notes: Ensure you are logged into the correct Alibaba Cloud account with Elasticsearch permissions

2. Select a specific model to configure  
   - Element: **Model Name** (dropdown) — main content area  
   - Notes: Ensure the model is in 'Draft' status before editing; published models cannot be modified

3. Click on the 'Configure Features' tab  
   - Element: **Configure Features** (tab) — top navigation bar  
   - Notes: The feature configuration form will load after selection

4. Click 'Add Feature' to create a new feature  
   - Element: **Add Feature** (button) — top-right corner  
   - Notes: A feature configuration form appears with a feature type dropdown

5. Select a feature type from the dropdown menu  
   - Element: **Feature Type** (dropdown) — form field  
   - Notes: Available options: id_feature, raw_feature, combo_feature, lookup_feature, overlap_feature. Subsequent fields change based on this selection.

6. Enter the feature name in the text input field  
   - Element: **feature_name** (text_input) — form field  
   - Notes: Must be unique within the model; used as the prefix of the output feature

7. Fill in the required parameters based on the selected feature type  
   - Element: **Configuration Fields** (text_input) — main form area  
   - Notes: For example, if **lookup_feature** is selected, fill in **map**, **key**, and optionally **combiner**. If **overlap_feature** is selected, fill in **query**, **title**, and **method**.

8. Click 'Save' to apply the configuration  
   - Element: **Save** (button) — bottom of the form  
   - Notes: Changes are saved immediately; no confirmation dialog appears. The feature is now part of the model draft.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| feature_name | text_input | Yes | — | Name of the feature. Used as the prefix of the output feature. |
| feature_type | dropdown | Yes | id_feature, raw_feature, combo_feature, lookup_feature, overlap_feature | Type of the feature. |
| value_dimension | number_input | No | — | Dimension of the output field. Default value: 1. |
| map | text_input | Yes (for lookup_feature) | — | A multi-value STRING field where each entry is in k1:v2 format. Example: system_query_ctr_decay. |
| key | text_input | Yes (for lookup_feature) | — | A field of any type. Its value is converted to a string and matched against the keys in map. |
| combiner | dropdown | No | sum, mean, max, min | Aggregation method when multiple map entries match the same key. Default: sum. |
| query | text_input | Yes (for overlap_feature) | — | The query-side multi-value STRING field. Example: user:attr1. |
| title | text_input | Yes (for overlap_feature) | — | The title-side multi-value STRING field. Example: item:attr2. |
| method | dropdown | Yes (for overlap_feature) | common_word, diff_word, query_common_ratio, title_common_ratio, is_contain, is_equal | The overlap calculation method. |

## FAQ

Q: Where can I find the Custom Sorting Models section in the console?  
A: In the Elasticsearch console, look for **Custom Sorting Models** in the left navigation panel under the "Model related" or "Industry Algorithm" section.

Q: Can I edit a custom sorting model after it has been published?  
A: No. Only models in 'Draft' status can be edited. You must create a new draft version if changes are needed after publishing.

Q: What happens if I leave value_dimension empty?  
A: The system uses the default value of 1. This field is optional and only relevant for dense vector output dimensions.

Q: Do I need special permissions to configure features?  
A: Yes. Your Alibaba Cloud RAM user must have permissions for Elasticsearch model management, including read/write access to custom sorting resources.

Q: Are all form fields shown at once?  
A: No. The visible fields dynamically change based on the selected **feature_type**. Only relevant parameters for the chosen type are displayed.

## Pricing & Billing

### Billing Model
Per-request pricing for custom sorting model inference, including feature generation and model execution.

### Price Reference
| Tier | Input Price | Output Price |
|------|-------------|--------------|
| custom_sorting_model | 0.0001 / | 0.0002 / |

### Free Tier
 1000 

### Billing Notes
. Quota limit: 8192 .