magento2 - 如何向 Magento2 ajax 搜索建议请求添加更多参数?
问题描述
我想添加修改搜索请求 (search/ajax/suggest/?q) 参数以包括以下内容:
"query": {
"multi_match": {
"query": "rad",
"fields": ["name^4", "sku"],
"type": "most_fields",
"operator": "and",
"minimum_should_match": 3,
"tie_breaker": 0.0,
"analyzer": "standard",
"boost": 1,
"fuzziness": "AUTO",
"fuzzy_transpositions": true,
"lenient": false,
"prefix_length": 0,
"max_expansions": 50,
"auto_generate_synonyms_phrase_query": true,
"cutoff_frequency": 0.01,
"zero_terms_query": "none"
}
}
我使用 AWS opensearch 作为我的搜索引擎。Magento 2.4.3 版
解决方案
推荐阅读
- angular - Angular 2:传递多个输入并与 JSON 文件中的各个属性进行比较并检索适当的对象
- java - 如何将 sharedpref 添加到 Retrofit 界面中
- php - PHP 安全数据库连接
- ios - 如何在 Swift 中为 URL 编码大型 Data 对象?
- ruby - gem install pry FilePermissionError
- postgresql - TABLESAMPLE SYSTEM_ROWS() 给出非随机结果
- python - 在 Matplotlib 中:我想单击图形的特定部分并将这些坐标保存到一个空数组中
- angular - 导出输入值 Angular 6
- mysql - 带有 NodeJS 和 MySql 的 jQuery 数据表
- javascript - 为什么这个 JS 代码在大多数地方都可以工作,但在我的机器上却不行?