与SphinxSE和RT索引有关的一些问题

编程入门 行业动态 更新时间:2024-10-24 10:22:13
本文介绍了与SphinxSE和RT索引有关的一些问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

    推荐答案

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

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

  • 您不能直接插入或更新SphinxSE表.而是在连接到SphinxQL(直接连接到sphinx守护程序)时使用INSERT/REPLACE.
  • 使用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')

  • You cannot INSERT or UPDATE directly the SphinxSE table. Instead you use INSERT/REPLACE while connected to SphinxQL (directly to sphinx daemon).
  • 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索引有关的一些问题

    本文发布于:2023-10-28 18:02:01,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1537371.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:索引   SphinxSE   RT

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!