分布式全文搜索引擎 riotsearch

码农软件 · 软件分类 · 搜索引擎 · 2019-08-25 23:27:13

软件介绍

riot 分布式全文搜索引擎, 采用 Go 语言开发。功能特性:

  • 高效索引和搜索(1M条微博500M数据28秒索引完,1.65毫秒搜索响应时间,19K搜索QPS)

  • 支持中文分词(使用gse分词包并发分词,速度27MB/秒)

  • 支持逻辑搜索

  • 支持中文转拼音搜索

  • 支持计算关键词在文本中的紧邻距离(token proximity)

  • 支持计算BM25相关度

  • 支持自定义评分字段和评分规则

  • 支持在线添加、删除索引

  • 支持多种持久存储

  • 支持 heartbeat

  • 支持分布式索引和搜索

  • 可实现分布式索引和搜索

  • 采用对商业应用友好的Apache License v2发布

示例代码:

package main

import (
"log"

"github.com/go-ego/riot"
"github.com/go-ego/riot/types"
)

var (
// searcher is coroutine safe
searcher = riot.Engine{}
)

func main() {
// Init searcher
searcher.Init(types.EngineOpts{
             Using:             4,
             SegmenterDict: "./dict/dictionary.txt"})
defer searcher.Close()

    text := "Google Is Experimenting With Virtual Reality Advertising"
    text1 := `Google accidentally pushed Bluetooth update for Home
    speaker early`
    text2 := `Google is testing another Search results layout with 
    rounded cards, new colors, and the 4 mysterious colored dots again`

    // Add the document to the index, docId starts at 1
    searcher.IndexDoc(1, types.DocIndexData{Content: text}, false)
    searcher.IndexDoc(2, types.DocIndexData{Content: text1}, false)
    searcher.IndexDoc(3, types.DocIndexData{Content: text2}, false)

// Wait for the index to refresh
searcher.FlushIndex()

// The search output format is found in the types.SearchResp structure
log.Print(searcher.Search(types.SearchReq{Text: "google testing"}))
}

主要改进:

  • 增加逻辑搜索 

  • 增加拼音搜索 

  • 增加分布式和 heartbeat

  • 分词等改进 

  • 增加更多api

  • 修复 bug

  • 删除依赖 cgo 的存储引擎, 增加 badger和 leveldb 持久化引擎

项目详情:

本文地址:https://www.codercto.com/soft/d/13178.html

腾讯网UED体验设计之旅

腾讯网UED体验设计之旅

任婕 等 / 电子工业出版社 / 2015-4 / 99.00元

《腾讯网UED体验设计之旅》是腾讯网UED的十年精华输出,涵盖了丰富的案例、极富冲击力的图片,以及来自腾讯网的一手经验,通过还原一系列真实案例的幕后设计故事,从用户研究、创意剖析、绘制方法、项目管理等实体案例出发,带领读者经历一场体验设计之旅。、 全书核心内容涉及网媒用户分析与研究方法、门户网站未来体验设计、H5技术在移动端打开的触控世界、手绘原创设计、改版迭代方法、文字及信息图形化设计、媒......一起来看看 《腾讯网UED体验设计之旅》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具