duanlian1320 2016-06-23 14:54
浏览 98

匹配查询全文索引不返回mysql中的完整结果

I am having a query in my project where I have to search for records with like query with wildcard search.

Following is the query:

Select * from table_name where Col_name like '% text %';

Now in above query normal indexing wouldn't work. So, I have used full text indexing here in MyISAM mysql table.

After which my query modifies like as follows

Select * from table_name where MATCH(Col_name) AGAINST('text' IN BOOLEAN MODE);

First query gives me 150000 records where as second query gives me only 3000 records.

Please guide me how to get all records which I am getting in first query as well in second query as well.

  • 写回答

1条回答 默认 最新

  • douhuiwan5141 2016-06-23 15:14
    关注

    Full Text Search indexes are based on individual words, that means the phrase row with texts or textWithOtherCharactersAround will no be returned in query result.

    The like operator finds in the entire field value according to wildcards.

    评论

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)