本文介紹了QueryProcessor的資料結構詳情。
描述
OpenSearch應用版本的查詢意圖和理解規則。
樣本
{
"name": "qp_lsh_test_1",
"domain": "GENERAL",
"processors": [{
"name": "stop_word",
"use_system_dictionary": true,
"intervention_dictionary": ""
}],
"indexes": [
"default"
],
"active": true
}結構
欄位 | 類型 | 描述 |
name | String | 規則名稱。 |
domain | String | 行業類型:GENERAL 通用,ECOMMERCE 電商,IT_CONTENT IT內容。 |
processors[] | Object | 包含功能具體說明查看下文:Processor。 |
indexes | Array | 應用的索引範圍。 |
active | Boolean | 是否預設規則。 |
Processor
樣本:
{
"name": "stop_word",
"use_system_dictionary": true,
"intervention_dictionary": ""
}結構
欄位 | 類型 | 描述 |
name | String | 功能名稱:stop_word 停用詞,spell_check 拼字檢查,term_weighting 詞權重,synonym 同義字,category_prediction 類目預測,ner 實體識別。 |
use_system_dictionary | Boolean | 是否使用系統內建詞典。 |
intervention_dictionary | String | 幹預詞典名稱。 |
類目預測
樣本:
{
"name": "stop_word",
"categoryPrediction": 12345,
"projectId": 12346
}結構
欄位 | 類型 | 描述 |
name | String | 功能名稱:category_prediction 類目預測。 |
categoryPrediction | Integer | 類目預測模型ID。 |
projectId | Integer | 演算法工程ID。 |
實體識別
樣本:
{
"name": "stop_word",
"use_system_dictionary": true,
"intervention_dictionary": "",
"priorities": [{
"priority": "HIGH",
"tag": "test",
"order": 1
}]
}結構
欄位 | 類型 | 描述 |
name | String | 功能名稱- ner 實體識別。 |
use_system_dictionary | Boolean | 是否使用系統內建詞典。 |
intervention_dictionary | String | 幹預詞典名稱。 |
priorities[] | Object | 實體類型重要性設定。 |
priorities[].priority | String | 重要性:HIGH- MIDDLE- LOW。 |
priorities[].tag | String | 實體類型的內部英文表示。 |
priorities[].order | Integer | 在同一個priority下的排序次序優先按照數字從小到大,預設為0。 |