solr - 关于 Solr 的几个问题。交易和实时搜索

标签 solr full-text-search real-time lucene

我在 PHP/MySQL 中有一个 Holdesk 应用程序。我想实现实时全文搜索,我已经入围了 Solr。 MySQL 数据库将存储所有搜索所需的数据,并将导入用于构建 Solr 索引的数据。所有搜索请求都将由 Solr 处理。

我想要的是

  • 实时搜索。当有人更新票证时,它应该可供搜索。
  • 如果多人同时更新票证,Solr 应该能够处理提交

  • 根据我对 Solr 的理解,这就是我认为系统的工作方式。用户更新票证 -> 修改相应的数据库记录 -> 向 Solr 服务器发送请求以修改索引中的相应文档。

    我读过一本关于 Solr 的书,下面的问题困扰着我。
  • 书中提到

    "commits are slow in Solr. Depending on the index size, Solr's auto-warming configuration, and Solr's cache state prior to committing, a commit can take a non-trivial amount of time. Typically, it takes a few seconds, but it can take some number of minutes in extreme cases"



    如果这是真的,那么我如何知道数据何时可用于搜索以及如何实现实时搜索?即使它需要几秒钟,也不能是实时的。此外,我不希望票证更新操作变慢(通过添加更新 Solr 索引的额外步骤)
  • 还提到

    "there is no transaction isolation. This means that if more than one Solr client were to submit modifications and commit them at overlapping times, it is possible for part of one client's set of changes to be committed before that client told Solr to commit. This applies to rollback as well. If this is a problem for your architecture then consider using one client process responsible for updating Solr."


  • 这是否意味着由于缺乏事务性提交,如果多人同时更新票证,Solr 会搞砸?

    现在摆在我面前的问题是:我可以使用 Solr 实现这两者吗?如果是,如何?

    编辑 1:
    是的!我遇到了几个类似的问题,但没有一个有令人满意的答案。所以又发帖了。对不起,如果您发现它重复。

    最佳答案

    您请求的功能称为近实时搜索,也称为 NRT。 NRT 的工作仍在进行中,但在过去几年中,Solr 中的这种支持已经有了很好的增量改进。有关 NRT 当前(1.4 - 3.5 版)和 future (4.0 版)支持的更多详细信息,请参阅以下链接。

    NRT 选项

  • Solr Near Realtime Search for versions 3.5/3.4/3.3/3.2/1.4.1
  • Near Real Time Search ver 3.x
  • Near Realtime Search Tuning (版本 1.4 - 3.x)
  • Solr Near Realtime Search (ver 4.0)
  • Benchmarking the new Solr 'Near Realtime' improvements (ver 4.0)
  • Solr with Ranking Algorithm (版本 1.4 - 4.0)
  • 关于solr - 关于 Solr 的几个问题。交易和实时搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9309914/

    相关文章:

    search - 在索引时而不是在 Solr 中查询时应用字段提升的好处?

    c# - 实时显示字符串值

    ios - 核心图的实时图 - 数据使用情况

    javascript - 实时荷兰式拍卖系统的系统架构

    hibernate - 如何在tomcat上使用maven在spring MVC中集成apache solr

    mysql - Sunsopt Solr 不搜索以 0 开头的邮政编码

    sql-server - 内容中有拼写错误的 SQL Server 全文搜索

    mysql - 这个mysql全文查询有什么问题?

    android-studio - Android Studio中的“查找全部”

    hadoop - nutch 1.10 作业失败,错误请求错误索引到 solr 5.3.1