• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






张伯雨

学习使人快乐
 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页

2017年9月1日

persistent_storage_worker.go
摘要: package engineimport ( "bytes" "encoding/binary" "encoding/gob" "github.com/huichen/wukong/types" "sync/atomic")type persistentStorageIndexDocumentRequest struct { docId uint64 da... 阅读全文
posted @ 2017-09-01 09:34 张伯雨 阅读(170) 评论(0) 推荐(0)
 
ranker_worker.go
摘要: package engineimport ( "github.com/huichen/wukong/types")type rankerAddDocRequest struct { docId uint64 fields interface{}}type rankerRankRequest struct { docs []types.Inde... 阅读全文
posted @ 2017-09-01 09:34 张伯雨 阅读(216) 评论(0) 推荐(0)
 
segmenter_worker.go
摘要: package engineimport ( "github.com/huichen/wukong/types")type segmenterRequest struct { docId uint64 hash uint32 data types.DocumentIndexData forceUpdate bool}func (... 阅读全文
posted @ 2017-09-01 09:34 张伯雨 阅读(224) 评论(0) 推荐(0)
 
engine.go
摘要: package engineimport ( "fmt" "github.com/huichen/murmur" "github.com/huichen/sego" "github.com/huichen/wukong/core" "github.com/huichen/wukong/storage" "github.com/huichen/wukong/typ... 阅读全文
posted @ 2017-09-01 09:33 张伯雨 阅读(448) 评论(0) 推荐(0)
 
indexer_worker.go
摘要: package engineimport ( "github.com/huichen/wukong/types" "sync/atomic")type indexerAddDocumentRequest struct { document *types.DocumentIndex forceUpdate bool}type indexerLookupRequest s... 阅读全文
posted @ 2017-09-01 09:33 张伯雨 阅读(212) 评论(0) 推荐(0)
 
storage.go
摘要: package storageimport ( "fmt" "os")const DEFAULT_STORAGE_ENGINE = "bolt" //默认存储引擎 为 bolt//存储引擎map集合 var supportedStorage = map[string]func(path string) (Storage, error){ "kv": openKVStora... 阅读全文
posted @ 2017-09-01 09:32 张伯雨 阅读(324) 评论(0) 推荐(0)
 
counter.go
摘要: package enginefunc (engine *Engine) NumTokenIndexAdded() uint64 { return engine.numTokenIndexAdded}func (engine *Engine) NumDocumentsIndexed() uint64 { return engine.numDocumentsIndexed}func (en... 阅读全文
posted @ 2017-09-01 09:32 张伯雨 阅读(147) 评论(0) 推荐(0)
 
bolt_storage.go
摘要: package storage//bolt存储引擎实现 import ( "github.com/boltdb/bolt" "time")var wukong_documents = []byte("wukong_documents")//bolt结构体 实现 同时实现storage接口type boltStorage struct { db *bolt.DB}//实现存储引... 阅读全文
posted @ 2017-09-01 09:31 张伯雨 阅读(232) 评论(0) 推荐(0)
 
kv_storage.go
摘要: package storage//kv 存储引擎实现import ( "github.com/cznic/kv" "io")//kv 存储结构体 并且实现了storage存储接口type kvStorage struct { db *kv.DB}//打开存储引擎 即:引擎map集合对应的value 值 函数的实现 key为path//返回存储引擎接口 和 err 代... 阅读全文
posted @ 2017-09-01 09:31 张伯雨 阅读(348) 评论(0) 推荐(0)
 
search_request.go
摘要: package typestype SearchRequest struct { // 搜索的短语(必须是UTF-8格式),会被分词 // 当值为空字符串时关键词会从下面的Tokens读入 Text string // 关键词(必须是UTF-8格式),当Text不为空时优先使用Text // 通常你不需要自己指定关键词,除非你运行自己的分词程序 Tokens [... 阅读全文
posted @ 2017-09-01 09:30 张伯雨 阅读(214) 评论(0) 推荐(0)
 
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页