1. 首页
  2. 开源项目

WuKongSearch 全文搜索引擎 WuKongSearch

polaris • 9348 次点击
这是一个分享于 的项目,其中的信息可能已经有所发展或是发生改变。
WuKong 全文搜索引擎。功能特性: * [高效索引和搜索](https://github.com/huichen/wukong/blob/master/docs/benchmarking.md)(1M条微博500M数据28秒索引完,1.65毫秒搜索响应时间,19K搜索QPS) * 支持中文分词(使用[sego分词包](https://github.com/huichen/sego)并发分词,速度27MB/秒) * 支持计算关键词在文本中的[紧邻距离](https://github.com/huichen/wukong/blob/master/docs/token_proximity.md)(token proximity) * 支持计算[BM25相关度](https://github.com/huichen/wukong/blob/master/docs/bm25.md) * 支持[自定义评分字段和评分规则](https://github.com/huichen/wukong/blob/master/docs/custom_scoring_criteria.md) * 支持[在线添加、删除索引](https://github.com/huichen/wukong/blob/master/docs/realtime_indexing.md) * 支持[持久存储](https://github.com/huichen/wukong/blob/master/docs/persistent_storage.md) * 可实现[分布式索引和搜索](https://github.com/huichen/wukong/blob/master/docs/distributed_indexing_and_search.md) * 采用对商业应用友好的[Apache License v2](https://github.com/huichen/wukong/blob/master/license.txt)发布 示例代码: <pre class="brush:ruby;toolbar: true; auto-links: false;">package main import ( &#34;github.com/huichen/wukong/engine&#34; &#34;github.com/huichen/wukong/types&#34; &#34;log&#34; ) var ( // searcher是协程安全的 searcher = engine.Engine{} ) func main() { // 初始化 searcher.Init(types.EngineInitOptions{ SegmenterDictionaries: &#34;github.com/huichen/wukong/data/dictionary.txt&#34;}) defer searcher.Close() // 将文档加入索引 searcher.IndexDocument(0, types.DocumentIndexData{Content: &#34;此次百度收购将成中国互联网最大并购&#34;}) searcher.IndexDocument(1, types.DocumentIndexData{Content: &#34;百度宣布拟全资收购91无线业务&#34;}) searcher.IndexDocument(2, types.DocumentIndexData{Content: &#34;百度是中国最大的搜索引擎&#34;}) // 等待索引刷新完毕 searcher.FlushIndex() // 搜索输出格式见types.SearchResponse结构体 log.Print(searcher.Search(types.SearchRequest{Text:&#34;百度中国&#34;})) }</pre>
授权协议:
Apache
开发语言:
Google Go 查看源码»
操作系统:
跨平台
9348 次点击
1 回复 | 直到
暂无回复
添加一条新回复 (您需要 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传

用户登录

没有账号?注册
(追記) (追記ここまで)

今日阅读排行

    加载中

一周阅读排行

    加载中