预测自动推理逻辑 [英] Predictive autosuggest logic

查看:130
本文介绍了预测自动推理逻辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的网站上实施预测性自动推荐。我已经使用Solr来提高搜索性能。但经过最近2天的调查,我了解到Solr没有任何内置软件包或支持来实施预测性建议,如亚马逊或flipkart搜索。任何人都可以告诉我什么是实施预测性建议的简单逻辑
或者哪些技术支持这种类型的搜索建议?

期望的工作流程如下,

如果用户搜索字符串samsung,我们的自动消息应该显示如下的分组建议,


  • 手机中的三星
  • 三星在电视中

  • 三星在笔记本电脑中



    等等



解决方案

您正在描述已过滤的搜索(通过autosuggest)。您可以使用Solr构面确定要提供哪些滤镜。假设移动,电视和笔记本电脑都是名为类别的Solr字段中的值: $ b


  1. 使用 rows = 0运行对 samsung 的查询并请求类别中的字词方面

  2. 您将得到一个频率排序的类别列表,其中文档匹配 samsung

  3. 如果您决定结果数量足够多,则将这些类别显示为过滤搜索选项(通过自动建议)。 当选择一个建议时,运行第二个针对所选类别筛选的 samsung 的查询(例如: q = samsung& fq = category:Mobile& rows = 10


I would like to implement predictive autosuggest in my website. I have used Solr to improve search performance. But after a research of last 2 days, I understand that Solr didn't have any built in package or support to implement predictive suggestion like Amazon or flipkart search. Anybody can advice me what is the easy logic to implement predictive suggestion OR what are the technologies supports this type of search suggestion?

Expected workflow as follows,

If user search string "samsung" our autosuggestion should show grouped suggestion as follows,

  • samsung in Mobile
  • samsung in Television
  • samsung in Laptop

    and so on

解决方案

You're describing "filtered search" (via autosuggest). You can determine which filters to offer using Solr facets.

Assuming "Mobile", "Television" and "Laptop" are all values in a Solr field called category:

  1. Run a query for samsung with rows=0 and request a terms facet on category.
  2. You'll get back an frequency-ordered list of categories where documents match samsung
  3. Display these categories as filtered search options (via autosuggest) if you decide the result count is high enough.
  4. When a suggestion is chosen, run a second query for samsung filtered by the chosen category (eg: q=samsung&fq=category:Mobile&rows=10)

这篇关于预测自动推理逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆