搜索中的模糊搜索 API
Fuzzy Search in the Search API
Azure 搜索 api 为建议提供了一个模糊参数。像这样:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&fuzzy=true&search=berlen
会 return "Berlin" 作为 berlen 的结果。
我找不到关于如何在普通搜索中激活它的文档
在那里设置 fuzzy = true 似乎没有改变任何东西
https://blssuggestions.search.windows.net/indexes/cities/docs?api-version=2015-02-28&search=berlen&fuzzy=true
[更新]:请参阅其他关于使用 querytype=full 的回复,因为此回复不再正确。
这是正确的。模糊搜索目前仅在建议 api.
中可用
这是现在的预览版 api:
https://{yourSite}.search.windows.net/indexes/{yourIndex}/docs?search={fieldToSearch}:{lookupValue}~&queryType=Full&api-version=2015-02-28-preview
注意 ~
和 queryType=Full
,两者都是强制模糊匹配所必需的。
文档在这里:
https://msdn.microsoft.com/library/azure/mt589323.aspx
警告:模糊搜索非常模糊!即 dog
将匹配任何 3 个字母的单词,只有一个匹配的字母 - dim
、now
、bag
我正在尝试弄清楚如何调整和调整,但由于它仍处于预览阶段,因此文档很少。
更新:我只是 re-read 文档,它已经用可选距离参数的详细信息进行了更新。我会调查的。
您需要致电:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&queryType=full&search=berlen~
您缺少 querytype=full 和要对其执行模糊搜索的字符后的波浪号。
Azure 搜索 api 为建议提供了一个模糊参数。像这样:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&fuzzy=true&search=berlen
会 return "Berlin" 作为 berlen 的结果。
我找不到关于如何在普通搜索中激活它的文档 在那里设置 fuzzy = true 似乎没有改变任何东西
https://blssuggestions.search.windows.net/indexes/cities/docs?api-version=2015-02-28&search=berlen&fuzzy=true
[更新]:请参阅其他关于使用 querytype=full 的回复,因为此回复不再正确。
这是正确的。模糊搜索目前仅在建议 api.
中可用这是现在的预览版 api:
https://{yourSite}.search.windows.net/indexes/{yourIndex}/docs?search={fieldToSearch}:{lookupValue}~&queryType=Full&api-version=2015-02-28-preview
注意 ~
和 queryType=Full
,两者都是强制模糊匹配所必需的。
文档在这里:
https://msdn.microsoft.com/library/azure/mt589323.aspx
警告:模糊搜索非常模糊!即 dog
将匹配任何 3 个字母的单词,只有一个匹配的字母 - dim
、now
、bag
我正在尝试弄清楚如何调整和调整,但由于它仍处于预览阶段,因此文档很少。
更新:我只是 re-read 文档,它已经用可选距离参数的详细信息进行了更新。我会调查的。
您需要致电:
https://blssuggestions.search.windows.net/indexes/cities/docs/suggest?api-version=2015-02-28&suggesterName=default&queryType=full&search=berlen~
您缺少 querytype=full 和要对其执行模糊搜索的字符后的波浪号。