搜索引擎---coreseek 模糊查询

环境:

centOS6.4-32位

msyql-5.1


coreseek 开启模糊查询,需要设置2个参数

min_infix_len = 1
enable_star = 1
数据库表
|  8 | test          | linux                       |
|  9 | test          | linux                       |
| 10 | test          | linux                       |
| 11 | test          | linux                       |
| 12 | M K L         | KS L                        |
| 13 | BIDU          | BMFI                        |
| 14 | BIDU          | BMFI                        |
| 15 | BIDU 1        | BMFI 1                      |
| 16 | BIDU          | BMFI                        |
| 17 | BIasfdsf      | BMFI                        |
| 18 | BI1111        | BMFI                        |
+----+---------------+-----------------------------+

[root@localhost coreseek]# bin/search 'b*'

displaying matches:
1. document=13, weight=2
        id=13
        title=BIDU
        content=BMFI
2. document=14, weight=2
        id=14
        title=BIDU
        content=BMFI
3. document=15, weight=2
        id=15
        title=BIDU 1
        content=BMFI 1
4. document=16, weight=2
        id=16
        title=BIDU
        content=BMFI
5. document=17, weight=2
        id=17
        title=BIasfdsf
        content=BMFI
6. document=18, weight=2
        id=18
        title=BI1111
        content=BMFI
7. document=19, weight=2
        id=19
        title=BI2222
        content=BMFI

words:
1. 'b*': 7 documents, 14 hits


使用场景:

根据用户输入的字符实时匹配
example:
输入 b
匹配出所有包含b 的股票代码


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值