如何禁用 Azure 搜索自动完成的标记化?
How to disable tokenization for Azure Search Autocomplete?
我为 "full_name" 索引字段创建了 Azure Search Suggester 以支持自动完成功能。现在,当我通过使用 "search" 参数来使用 Azure 自动完成 REST 端点时,比方说 "Lor" 我只得到结果 "Lorem" 而不是 "Lorem Ipsum"。有什么方法可以禁用建议者的标记化并为自动完成的搜索词 "Lor" 取回全名,例如 "Lorem Ipsum"?
Autocomplete API 旨在根据输入到搜索框(提前输入)的不完整字词建议搜索字词。它支持三种模式:
oneTerm – Only one term is suggested. If the query has two terms, only
the last term is completed. For example:
"washington medic" -> "medicaid", "medicare", "medicine"
twoTerms – Matching two-term phrases in the index will be suggested,
for example:
"medic" -> "medicare coverage", "medical assistant"
oneTermWithContext – Completes the last term in a query with two or
more terms, where the last two terms are a phrase that exists in the
index, for example:
"washington medic" -> "washington medicaid", "washington medical"
twoTerms 模式可能适合您。如果您正在寻找基于不完整查询词建议文档的 API,请尝试 Suggestions API。它 returns 为匹配查询的所有文档启用了建议器的字段的全部内容。
我为 "full_name" 索引字段创建了 Azure Search Suggester 以支持自动完成功能。现在,当我通过使用 "search" 参数来使用 Azure 自动完成 REST 端点时,比方说 "Lor" 我只得到结果 "Lorem" 而不是 "Lorem Ipsum"。有什么方法可以禁用建议者的标记化并为自动完成的搜索词 "Lor" 取回全名,例如 "Lorem Ipsum"?
Autocomplete API 旨在根据输入到搜索框(提前输入)的不完整字词建议搜索字词。它支持三种模式:
oneTerm – Only one term is suggested. If the query has two terms, only the last term is completed. For example:
"washington medic" -> "medicaid", "medicare", "medicine"
twoTerms – Matching two-term phrases in the index will be suggested, for example:
"medic" -> "medicare coverage", "medical assistant"
oneTermWithContext – Completes the last term in a query with two or more terms, where the last two terms are a phrase that exists in the index, for example:
"washington medic" -> "washington medicaid", "washington medical"
twoTerms 模式可能适合您。如果您正在寻找基于不完整查询词建议文档的 API,请尝试 Suggestions API。它 returns 为匹配查询的所有文档启用了建议器的字段的全部内容。