问题标签 [sphinx]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
sphinx - Sphinx & thinking_sphinx 真的很稳定吗?不索引列
我遇到了thinking_sphinx/sphinx 的奇怪行为。
我的define_index 块大约有100 行,所以我正在索引很多列。对于全文搜索,我只需要大约 10 个属性,对于排序和过滤,我还有大约 50 列,主要是浮点数和整数。
通过过滤我的意思是使用“with”或“without”选项。
搜索并不能始终如一地工作。突然之间,一个属性无法过滤。或者如果我添加一个新的,它不起作用。只有经过大量修补后,它才突然开始工作。我无法真正重现它。有时会导致我成功的步骤,其中:
- rm -rf 数据库/狮身人面像
- 更改属性定义,例如 has some_attribute => has some_attribute, :sortable => true 或 => has some_attribute, :sortable => true, :as => "some_attribute"
- 重新启动服务器
- 分配一个新的 :as name => 具有 some_attribute, :as => "some_attribute_new"
(是的,我在每一步之后都 rake ts:rebuild 或 rake ts:in)
有没有其他人遇到过类似的问题?
ruby-on-rails - 如何阻止 ThinkingSphinx 查询数据库以分面 MVA 字段?
我设置了一个索引,因此我可以对类别 ID 进行分面,如下所示:
当我执行类似的查询时Listing.facets
,我会在哈希中得到正确的结果,每个 category_id 都指向它的计数。:)
唯一的问题是 Thinking Sphinx 运行数据库查询并加载许多(但不是全部)这些对象!由于此属性只是 MVA 整数;我认为他们不需要任何翻译。
这里发生了什么?为了性能,有什么办法可以阻止 Thinking Sphinx 实例化所有这些 ActiveRecord 对象?(可能有数百个!)或者有没有更好的方法来使用 Sphinx 和 Thinking Sphinx 实现这一点?
谢谢!
ruby-on-rails - 通过 Capistrano 部署 Thinking Sphinx 会产生“第 6 列没有名称”
我不确定我遇到的问题发生在哪里。当我运行部署任务时 rake thinking_sphinx:configure 工作正常,但是当它尝试索引它时会发生此错误:
错误:索引“board_core”:第 6 列没有名称。
错误:索引“board_delta”:第 6 列没有名称。
...对于我所有的索引和增量索引,依此类推。起初我认为这是 capistrano 的问题,因为我在 windows 机器和 mac 上设置了项目,并且 cap staging deploy 部署到了 ubuntu 设置。
似乎出错的查询的 SQL 是:
..意味着破坏的部分是 select 0 as ``sphinx_deleted \
,这对我来说似乎很好(当直接通过 mysql 调用它时它可以工作,当然减去使用 $start 和 $end 的 where 子句的部分)所以我不知道是什么可能导致错误。我唯一的想法是 sphinx 的索引器出错了,但如果是这种情况,那么我仍然不知道如何解决这个问题。
提前感谢您的任何帮助/提示。
ruby-on-rails - 使用 Ruby-on-Rails、Sphinx 或 UltraSphinx 和 HTML 源代码(不是数据库)
sphinx-0.9.9-rc2 的文档说明:
要索引的数据通常可以来自非常不同的来源:SQL 数据库、纯文本文件、HTML 文件、邮箱等。
但是,除了 SQL 之外,我找不到任何关于设置源的文档。配置文件似乎没有表明源可以是数据库以外的任何东西。任何人都有任何有用的链接来设置带有 HTML 源的 sphinx?
linux - best way to reindex sphinx in ubuntu hardy
I'm running a slice of ubuntu hardy.
I've installed sphinx, and I would like to run the sphinx indexer every x
minutes.
What is the best way to go about doing this?
mysql - 如何搜索列的一部分?
我有一个 mysql 表,其中包含 4000 万条记录,这些记录由我无法控制的进程填充。每个月只添加一次数据。此表需要通过名称列进行搜索。但名称列包含格式为“Last First Middle”的全名。
在 sphinx.conf 中,我有
如何使用 sphinx 搜索按名字和/或姓氏搜索?我希望能够仅在名字中搜索“Smith”吗?
ruby-on-rails - Multiple Keyword Search Using Thinking Sphinx Rails Plugin
I'm using the sphinx search engine with the thinking sphinx plugin for rails.
I have a job model with a title attribute that is indexed by sphinx. I'd like to search across multiple jobs and capture any that match 1 or more keywords.
For instance...
Job.search("rails, django, symfony")
...and get an array of job objects with the following titles "rails developer for hire", "looking for a django wizard", "anyone know symfony?"
I have these three separate jobs stored and indexed in my database. When I run the above search i get an empty array. Each job is found when a single query term is provided on its own.
I would rather not do this Job.search "rails" Job.search "django" Job.search "symfony"
Does anyone know how to pass multiple keywords to the sphinx search engine?
mysql - 选择独立的全文搜索服务器:Sphinx 还是 SOLR?
我正在寻找具有以下属性的独立全文搜索服务器:
- 必须作为独立服务器运行,可以为来自多个客户端的搜索请求提供服务
- 必须能够通过索引 SQL 查询的结果来进行“批量索引”:比如“SELECT id, text_to_index FROM documents;”
- 必须是免费软件并且必须在以 MySQL 作为数据库的 Linux 上运行
- 必须快(排除 MySQL 的内部全文搜索)
我发现具有这些属性的替代品是:
- Solr(基于 Lucene)
- ElasticSearch(同样基于 Lucene)
- 狮身人面像
我的问题:
- 他们如何比较?
- 我错过了任何替代方案吗?
- 我知道每个用例都是不同的,但在某些情况下我绝对不想使用某个包吗?
php - 如何使用 MySQL 的 sphinx 插件使用 PHP 实现全文搜索?
有人可以在这里提供演示吗?
以及如何同时检索匹配的片段?
php - 跨大量列的 PHP 和 MySQL 搜索
我需要一种方法来搜索特定表中的 50 多个列,包括 varchar 和 int。我见过人们推荐 Lucene 和 Sphinx,但我不知道如何使用它们,而且 MySQL 的全文不允许我组合超过 16 列或 varchar 和 int 列。