首页 \ 问答 \ 配置Solr用于暗示/预测自动完成搜索(Configuring Solr for Suggestive/Predictive Auto Complete Search)

配置Solr用于暗示/预测自动完成搜索(Configuring Solr for Suggestive/Predictive Auto Complete Search)

我们正在努力将Solr 3.6集成到电子商务网站。 我们有索引数据和搜索表现非常好。

我们在确定如何使用Predictive Search / Auto Complete Search建议方面遇到了一些困难。 还有兴趣了解实现此功能的最佳实践。

我们的目标是提供类似于http://www.amazon.com/的预测搜索,但不知道如何使用Solr实现它。 更具体地说,我想了解如何从Solr构建这些术语,还是由solr外部的其他东西管理? 如何建立字典以提供这些建议? 此外,对于某些领域,搜索应该提供在类别中搜索。 尝试在亚马逊搜索框中键入“xper”,你会注意到除了xperia,xperia s,xperia p之外,它还列出了手机和配件中的xperia s,这是一个类别。

使用自定义词典这将很难管理。 或者我们可能不知道如何正确地做到这一点。 期待您指导我们如何最好地利用solr来实现这种暗示搜索。


We are working on integrating Solr 3.6 to an eCommerce site. We have indexed data & search is performing really good.

We have some difficulties figuring how to use Predictive Search / Auto Complete Search Suggestion. Also interested to learn the best practices for implementing this feature.

Our goal is to offer predictive search similar to http://www.amazon.com/, but don't know how to implement it with Solr. More specifically I want to understand how to build those terms from Solr, or is it managed by something else external to solr? How the dictionary should be built for offering these kind of suggestions? Moreover, for some field, search should offer to search in category. Try typing "xper" into Amazon search box, and you will note that apart from xperia, xperia s, xperia p, it also list xperia s in Cell phones & accessories, which is a category.

Using a custom dictionary this would be difficult to manage. Or may be we don't know how to do it correctly. Looking to you to guide us on how best utilize solr to achieve this kind of suggestive search.


原文:https://stackoverflow.com/questions/12215537
更新时间:2023-05-10 10:05

最满意答案

你有一个id被定义为@+id/11不会生成有效的Java标识符,因此是错误。 出于同样的原因,不能创建名称以数字开头或包含空格或匹配保留关键字的id或资源。


You have an id somewhere defined as @+id/1. 1 does not make for a valid Java identifier, hence the error. For that same reason, one cannot create ids or resources which name starts with a number, or contains spaces, or matches a reserved keyword.

相关问答

更多
  • 首先检查资源文件是否有错误。 如果是这种情况,则不会生成R.java。 检查你是否已经更新你的adt到rev 22.如果是这样,请按照下面的步骤操作 右键单击您的项目转到属性。 Java构建路径。 选择订单导出选项卡。 确保已选择Android专用库。 如果你有引用库项目。 也为图书馆项目做同样的事情。 清洁和构建。 还转到android sdk管理器,并检查您是否安装了android sdk构建工具。 这很多不是必要的,但要确保你已经安装了android构建工具。 检查下面的链接 Eclipse错误:R无 ...
  • Intellij版本的“clean”称为“Rebuild Project”。 它位于Build菜单中。 The Intellij version of "clean" is called "Rebuild Project". It's in the Build menu.
  • 我不确定gcm_unregistered应该是什么,但我建议不要编辑R类,因为它生成了。 如果您想在Resources(R)中添加一些内容,请通过xml完成。 用于操纵/访问资源的Android网站http://developer.android.com/guide/topics/resources/accessing-resources.html 编辑:所以你想添加一个字符串资源,然后转到res / values /下的strings.xml,并添加gcm_unregistered和你想要的值。 I'm ...
  • 您可以创建一个新项目,然后将所有类和资源从“src”和“res”文件夹复制到新项目,然后您可以构建新项目。 You can make a new project and then copy all classes and resources from "src" and "res" folder to new project, then you can build your new project.
  • 你有一个id被定义为@+id/1 。 1不会生成有效的Java标识符,因此是错误。 出于同样的原因,不能创建名称以数字开头或包含空格或匹配保留关键字的id或资源。 You have an id somewhere defined as @+id/1. 1 does not make for a valid Java identifier, hence the error. For that same reason, one cannot create ids or resources which name ...
  • 查看代码的“导入”部分。 由于您删除了原始R,因此Eclipse可能会帮助您填写R作为com.android.R而不是com.yourproject.R 我有时也会遇到Eclipse Resource的问题,有时我发现关闭并且“自动buiild”功能可能有所帮助,或者只是重启Eclipse有时可能有所帮助。 这是Mac OS下的一种小车。 Look at the 'import' section of your code. Since you deleted your original R, chances ...
  • 如果它不起作用并且你认为你已经尝试了所有的东西,那么先吹掉你的eclipse安装(卸载并重新安装)。 如果删除并重新安装插件不起作用,请重命名~/.eclipse文件夹并重新开始。 如果这不起作用,请删除工作区中的.metadata文件夹...然后重新开始。 (您将不得不重新导入所有项目) 从存储库安装Eclipse(我正在使用eclipse来自软件中心和openJDK)。 如果您正在运行x64: sudo apt-get install ia32-libs-multiarch 作为root启动eclips ...
  • 检查strings.xml文件的编码,确保它是UTF-8 。 Check for the encoding of your strings.xml file, ensure it is UTF-8.
  • 您能否查看一下您的xml文件,看看您是否拥有所有id等的正确命名约定。 我在考虑这些类型的命名错误: android:id="@+id/text-view-example" 并将它们重命名为: android:id="@+id/text_view_example" 要么 右键单击左侧面板(android-view)中的“app”,然后单击“在路径中查找”,然后键入确切的查询login_user-fb ,然后将其替换为login_user_fb 。 Could you please check thr ...
  • 您可以尝试清理并重建项目。 应重新创建R.java文件。 如果这不起作用,你可以尝试找到失踪者; 我希望能解决这个问题。 You can try to clean and rebuild you project. The R.java file should be recreated. And if this does not work you can try to find the missing ;. I hope that solves the problem.

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)