搜索引擎——匹配方式

来源:互联网 发布:mac 管理员账户没有了 编辑:程序博客网 时间:2024/06/06 01:24

       规则:按照搜索条件,在标题、内容进行匹配,匹配结果进行分页且按照匹配结果的得分和创建时间进行排序。

SQL 语句:

select between 0 to 9 * from CNews where title^2 match '北京^5000^0 大学^5000^2' or content match '北京^5000^0 大学^5000^2' order by time desc,score desc </span>

      在搜索结果中查找就是在原来的条件上再加一个条件,进行重新查找

例如:

在 match 'abc^5000^0 news^5000^3 to^5000^7 cut^5000^9'  的结果中再查找含包含 Staff 这个词的记录

SQL 语句:

Select top 10 Id, Title, Score from EnglishNews where title match 'abc^5000^0 news^5000^3 to^5000^7 cut^5000^9' and title contains 'Staff' order by score desc


0 0