与SphinxSE和RT索引有关的一些问题 [英] Some questions related to SphinxSE and RT indexes

查看:154
本文介绍了与SphinxSE和RT索引有关的一些问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我考虑在我的一个项目中使用Sphinx搜索,因此我有一些与之相关的问题.

I consider using Sphinx search in one of my projects so I have a few questions related to it.

  1. 使用SphinxSE和RT索引时,SphinxSE表中的每个UPDATE或INSERT都会更新索引,对吗?不需要调用索引器之类的吗?
  2. 我可以同时搜索标签(用户输入的文档关键字)和内容,并赋予标签匹配更多相关性吗?并且,如果可能的话,如何实现标签搜索(现在我将它们放在像倒排索引一样的单独表中)
  3. 对于填充器属性,最好将其重复项粘贴在SphinxSE表中或使用我拥有的常规文档表中的mysql使用填充器?

提前谢谢!

推荐答案

好,我终于了解了狮身人面像是如何工作的.

OK, I finally understand how things work with the sphinx thing.

  1. 您不能直接插入或更新SphinxSE表.而是在连接到SphinxQL(直接连接到sphinx守护程序)时使用INSERT/REPLACE.
  2. 使用1.10,您可以添加多个全文本可搜索字段.我添加了标题,标签和内容.并赋予标题更多权重的查询,然后是标签,然后是内容,如下所示: SELECT SQL_NO_CACHE * FROM sphinx_docs WHERE query = 'a lot of keywords;weights=3,2,1;'; 我用SQL_NO_CACHE告诉mysql不要缓存它的结果,因为在下一次调用时,我无法获得从sphinx(SHOW STATUS LIKE 'sphinx_total_found')

  1. You cannot INSERT or UPDATE directly the SphinxSE table. Instead you use INSERT/REPLACE while connected to SphinxQL (directly to sphinx daemon).
  2. With 1.10 you can add multiple FullText searchable fields. I added title, tags and content. And the query to give more weight to the title, then tags and then content looks like this: SELECT SQL_NO_CACHE * FROM sphinx_docs WHERE query = 'a lot of keywords;weights=3,2,1;'; I use the SQL_NO_CACHE to tell mysql not to cache the result of this, because on next calls I can't get the number of rows returned from sphinx (SHOW STATUS LIKE 'sphinx_total_found')

最好让sphinx进行所有排序,填充和仅使用mysql联接需要更多信息的表.

It's better to let sphinx do all the sorting, filltering and use mysql only to JOIN the table you need more info from.

此外,我不得不说,我多次尝试将sphinxse插件添加到mysql都没有成功(无休止的等待时间),所以我切换到了包含SphinxSE存储引擎的MariaDB 5.2.4.

In addition I have to say that I tried many times to add the sphinxse plugin to mysql without success (endless make waiting hours) so I switched to MariaDB 5.2.4 which includes the SphinxSE storage engine.

这篇关于与SphinxSE和RT索引有关的一些问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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