Algolia 是否有推荐搜索?
Does Algolia have a search with recommendation?
我想知道 Algolia 服务是否在进行搜索时提供某种推荐机制。
我在 API 文档中找不到任何与基于索引数据为客户提供更精细和智能的搜索替代方案相关的内容。
我试图描述的场景如下(这个例子有点夸张):
Given a user is searching for "red car" then the system provides more specific search alternatives and possibly related items that exist in the database (e.g. ferrari, red driving gloves, fast and furious soundtrack :-) )
更新
为了将来参考,我最终使用 Algolia 的文本搜索功能做了一个基本的推荐系统。
总结一下,当car
被保存时,它的属性color
、speed
、engine
等用于创建同义词索引,例如[=13] =] ferrari
在 Engine 索引中:
{
synonyms: ['red', 'ferrari', 'fast'],
value: 'ferrari'
}
最后,每个索引,必须指明 synonyms
属性用于搜索和 value
作为搜索的返回结果。
Algolia 不提供开箱即用的那种 "intelligence"。
您可以通过使用同义词和其他参数的组合来大致了解您要查找的内容:
- 定义同义词组,例如 "car,Ferrari,driving gloves"、"red,dark red,tangerine,orange"、...
- 发送搜索查询时,将
optionalWords
设置为该查询中包含的单词列表。这将使您查询的每个词都可选。
- 同时将
removeStopWords
设置为 true
,以便忽略像 "the"、"a" (...) 这样的词,以提高相关性。
有了明确定义的同义词列表,这将使您的原始查询被解释为许多其他可能性,从而增加可能结果的多样性。
请注意,这也可能会影响结果的相关性,例如,用户在搜索汽车时可能不想查找手套!
我想知道 Algolia 服务是否在进行搜索时提供某种推荐机制。
我在 API 文档中找不到任何与基于索引数据为客户提供更精细和智能的搜索替代方案相关的内容。
我试图描述的场景如下(这个例子有点夸张):
Given a user is searching for "red car" then the system provides more specific search alternatives and possibly related items that exist in the database (e.g. ferrari, red driving gloves, fast and furious soundtrack :-) )
更新
为了将来参考,我最终使用 Algolia 的文本搜索功能做了一个基本的推荐系统。
总结一下,当car
被保存时,它的属性color
、speed
、engine
等用于创建同义词索引,例如[=13] =] ferrari
在 Engine 索引中:
{
synonyms: ['red', 'ferrari', 'fast'],
value: 'ferrari'
}
最后,每个索引,必须指明 synonyms
属性用于搜索和 value
作为搜索的返回结果。
Algolia 不提供开箱即用的那种 "intelligence"。
您可以通过使用同义词和其他参数的组合来大致了解您要查找的内容:
- 定义同义词组,例如 "car,Ferrari,driving gloves"、"red,dark red,tangerine,orange"、...
- 发送搜索查询时,将
optionalWords
设置为该查询中包含的单词列表。这将使您查询的每个词都可选。 - 同时将
removeStopWords
设置为true
,以便忽略像 "the"、"a" (...) 这样的词,以提高相关性。
有了明确定义的同义词列表,这将使您的原始查询被解释为许多其他可能性,从而增加可能结果的多样性。
请注意,这也可能会影响结果的相关性,例如,用户在搜索汽车时可能不想查找手套!