百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

riot

> 编程语言
开源

开源,分布式、简单高效的搜索引擎;警告:这是 V1 测试版,内存消耗较大,V2 将会重写

6.1K stars0 点赞3 次浏览
访问官网GitHub

工具介绍

开源,分布式、简单高效的搜索引擎;警告:这是 V1 测试版,内存消耗较大,V2 将会重写

Riot

English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Русский | Português

The fast modern text indexing in go, fork form the bluge

Features

  • Supported field types:
    • Text, Numeric, Date, Boolean, IP, Geo Point, Vector
  • Supported query types:
    • Term, Phrase, Match, Match Phrase, Prefix, Regexp, Wildcard, Fuzzy
    • Conjunction, Disjunction, Boolean
    • Numeric Range, Date Range, Term Range, IP Range
    • Geo Bounding Box, Geo Distance, Geo Polygon, KNN
  • BM25 Similarity/Scoring with pluggable interfaces
  • Search result match highlighting
  • Extendable Aggregations:
    • Bucketing
      • Terms
      • Numeric Range
      • Date Range
    • Metrics
      • Min/Max/Count/Sum
      • Avg/Weighted Avg
      • Cardinality Estimation (HyperLogLog++)
      • Quantile Approximation (T-Digest)

Installation

bash
go get -u github.com/vcaesar/riot

Usage

Runnable versions of all three programs live in test/readme_demo.

Indexing

Save as write/main.go and run with go run ./write:

go
package main

import (
	"log"

	riot "github.com/vcaesar/riot"
)

func main() {
	config := riot.DefaultConfig("./riot_index")
	writer, err := riot.OpenWriter(config)
	if err != nil {
		log.Fatalf("error opening writer: %v", err)
	}
	defer writer.Close()

	doc := riot.NewDocument("example").
		AddField(riot.NewTextField("name", "riot"))

	err = writer.Update(doc.ID(), doc)
	if err != nil {
		log.Fatalf("error updating document: %v", err)
	}
	log.Printf("indexed: %s", doc.ID())
}

Querying

Save as read/main.go and run with go run ./read against the index written above. If you index and search in the same process, use writer.Reader() instead of riot.OpenReader (or riot.InMemoryOnlyConfig() for an in-memory index):

…

Output:

match: example

Chinese / Japanese with gse

The gse package wraps riot with a gse tokenizer for CJK text, plus query-string search and highlighting. Save as gse/main.go and run with go run ./gse:

…

Output:

…

License

Apache License Version 2.0

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gogogolanggwkindex

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言