• <bdo id='VmDo6'></bdo><ul id='VmDo6'></ul>

      <small id='VmDo6'></small><noframes id='VmDo6'>

      <tfoot id='VmDo6'></tfoot>
    1. <i id='VmDo6'><tr id='VmDo6'><dt id='VmDo6'><q id='VmDo6'><span id='VmDo6'><b id='VmDo6'><form id='VmDo6'><ins id='VmDo6'></ins><ul id='VmDo6'></ul><sub id='VmDo6'></sub></form><legend id='VmDo6'></legend><bdo id='VmDo6'><pre id='VmDo6'><center id='VmDo6'></center></pre></bdo></b><th id='VmDo6'></th></span></q></dt></tr></i><div id='VmDo6'><tfoot id='VmDo6'></tfoot><dl id='VmDo6'><fieldset id='VmDo6'></fieldset></dl></div>
      1. <legend id='VmDo6'><style id='VmDo6'><dir id='VmDo6'><q id='VmDo6'></q></dir></style></legend>

        跨多个表的 MySQL 全文搜索

        MySQL full text search across multiple tables(跨多个表的 MySQL 全文搜索)
        <tfoot id='EMcj8'></tfoot>
        <legend id='EMcj8'><style id='EMcj8'><dir id='EMcj8'><q id='EMcj8'></q></dir></style></legend>
          • <bdo id='EMcj8'></bdo><ul id='EMcj8'></ul>

                    <tbody id='EMcj8'></tbody>
                1. <small id='EMcj8'></small><noframes id='EMcj8'>

                2. <i id='EMcj8'><tr id='EMcj8'><dt id='EMcj8'><q id='EMcj8'><span id='EMcj8'><b id='EMcj8'><form id='EMcj8'><ins id='EMcj8'></ins><ul id='EMcj8'></ul><sub id='EMcj8'></sub></form><legend id='EMcj8'></legend><bdo id='EMcj8'><pre id='EMcj8'><center id='EMcj8'></center></pre></bdo></b><th id='EMcj8'></th></span></q></dt></tr></i><div id='EMcj8'><tfoot id='EMcj8'></tfoot><dl id='EMcj8'><fieldset id='EMcj8'></fieldset></dl></div>
                  本文介绍了跨多个表的 MySQL 全文搜索的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一系列表格,其中包含我想要全文搜索的数据.我尝试将表格与 UNION 结合使用,但结果丢失了全文索引,因此无法进行全文搜索.我不认为将数据放入临时表是要走的路.有什么办法可以有效地全文搜索这些表吗?提前致谢!

                  I have a series of tables that contain data I want to full text search. I've tried combining the tables with UNION, but the result loses its fulltext index so can't be fulltext searched. I don't think that putting the data into a temp table is the way to go. Is there someway that I can fulltext search these tables efficiently? Thanks in advance!

                  更新:我对全文的查询是

                  UPDATE: my query for fulltext was

                  SELECT ID, Title, Description, Author, MATCH (Title,Tags,Body) AGAINST ("search terms") AS Relevance 
                  FROM [combination of tables goes here] 
                  WHERE MATCH (Title,Tags,Body) AGAINST ("search terms")
                  

                  推荐答案

                  MySQL 无法在多个表中创建全文(或任何)索引.所以使用单一索引是不行的.

                  MySQL can't make a fulltext (or any) index accross multiple tables. So using a single index is out.

                  作为替代方案,您可以:

                  As an alternative, you could either:

                  1. 在每个表上使用索引,并根据需要使用连接/联合来检索符合您要求的行.

                  1. Use an index on each table, and a join/union as appropriate to retrieve the rows that match your requirements.

                  创建一个聚合表来应用索引.

                  Create an aggregate table to apply the index to.

                  使用 lucene 或 solr 等工具提供搜索索引.(如果您要进行任何类型的扩展,这可能是最佳选择)

                  Use a tool such as lucene or solr to provide your search index. (If you are going for any sort of scale, this is likely the best option)

                  这篇关于跨多个表的 MySQL 全文搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Set the variable result, from query(设置变量结果,来自查询)
                  What is dynamic SQL?(什么是动态 SQL?)
                  Mysql - How to quit/exit from stored procedure(Mysql - 如何退出/退出存储过程)
                  Does MySQL have time-based triggers?(MySQL 有基于时间的触发器吗?)
                  is it possible to call a sql script from a stored procedure in another sql script?(是否可以从另一个 sql 脚本中的存储过程调用 sql 脚本?)
                  Procedure to loop through comma separated string is not working(遍历逗号分隔字符串的过程不起作用)
                    <tbody id='X6YZc'></tbody>
                  • <bdo id='X6YZc'></bdo><ul id='X6YZc'></ul>

                    <small id='X6YZc'></small><noframes id='X6YZc'>

                      <legend id='X6YZc'><style id='X6YZc'><dir id='X6YZc'><q id='X6YZc'></q></dir></style></legend>

                    1. <tfoot id='X6YZc'></tfoot>
                    2. <i id='X6YZc'><tr id='X6YZc'><dt id='X6YZc'><q id='X6YZc'><span id='X6YZc'><b id='X6YZc'><form id='X6YZc'><ins id='X6YZc'></ins><ul id='X6YZc'></ul><sub id='X6YZc'></sub></form><legend id='X6YZc'></legend><bdo id='X6YZc'><pre id='X6YZc'><center id='X6YZc'></center></pre></bdo></b><th id='X6YZc'></th></span></q></dt></tr></i><div id='X6YZc'><tfoot id='X6YZc'></tfoot><dl id='X6YZc'><fieldset id='X6YZc'></fieldset></dl></div>