现代文本/数字/地理空间/索引库
GO 中的现代索引+搜索库
□ 特性
文本'、数字'、日期 '、布尔'、地标'、geoshape'、IP'、车辆'连通 ' 、分通'、布尔(必须'/应该'/`必须'-不)□ 索引
(原始内容存档于2019-09-29) (英语). ```go message := struct { Id string From string Body string }{ Id: "example", From: "[email protected]", Body: "bleve indexing is easy", }
mapping := bleve.NewIndexMapping() index, err := bleve.New("example.bleve", mapping) if err != nil { panic(err) } index.Index(message.Id, message)
□ 查询
开始
指数, :=bleve。 打开( “例. bleve” )
查询 := bleve. NewQueryString Query ("bleve")
搜索请求 := bleve. NewSearch Request( 清)
search(搜索请求)
`(a). `scorch: 失败的合并会立即且永久重试,因此损坏的分段会变成一个无尽的写入循环
`geo/geojson` 包中的编译错误: 无法实现 index.GeoJSON (缺少 BoundingBox 方法)
使用 go fix 进行代码基础的现代化
`BooleanQuery.Filter`: 搜索器未关闭,其错误被忽略
单独的 "/" 会被视为正则表达式
在排序时使用自定义字符串顺序
使用 NewMemOnly 时,同义词搜索不起作用
怎么修复呢?
建议: 为 Bleve 索引添加部分更新功能 (Go)
乍得