Skip to content

Latest commit

History

2,970 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

bleve bleve

TestsCoverage StatusGo ReferenceJoin the chatGo Report CardSourcegraphLicense

A modern indexing + search library in GO

Features

Indexing

message:=struct {
IdstringFromstringBodystring
}{
Id: "example",
From: "xyz@couchbase.com",
Body: "bleve indexing is easy",
}
mapping:=bleve.NewIndexMapping()
index, err:=bleve.New("example.bleve", mapping)
iferr!=nil {
panic(err)
}
index.Index(message.Id, message)

Querying

index, _:=bleve.Open("example.bleve")
query:=bleve.NewQueryStringQuery("bleve")
searchRequest:=bleve.NewSearchRequest(query)
searchResult, _:=index.Search(searchRequest)

Command Line Interface

To install the CLI for the latest release of bleve, run:

go install github.com/blevesearch/bleve/v2/cmd/bleve@latest
$ bleve --help
Bleve is a command-line tool to interact with a bleve index.
Usage:
bleve [command]
Available Commands:
bulk bulk loads from newline delimited JSON files
check checks the contents of the index
count counts the number documents in the index
create creates a new index
dictionary prints the term dictionary for the specified field in the index
dump dumps the contents of the index
fields lists the fields in this index
help Help about any command
index adds the files to the index
mapping prints the mapping used for this index
query queries the index
registry registry lists the bleve components compiled into this executable
scorch command-line tool to interact with a scorch index
Flags:
-h, --help help for bleve
Use "bleve [command] --help" for more information about a command.

Text Analysis

Bleve includes general-purpose analyzers (customizable) as well as pre-built text analyzers for the following languages:

Arabic (ar), Bulgarian (bg), Catalan (ca), Chinese-Japanese-Korean (cjk), Kurdish (ckb), Danish (da), German (de), Greek (el), English (en), Spanish - Castilian (es), Basque (eu), Persian (fa), Finnish (fi), French (fr), Gaelic (ga), Spanish - Galician (gl), Hindi (hi), Croatian (hr), Hungarian (hu), Armenian (hy), Indonesian (id, in), Italian (it), Dutch (nl), Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Swedish (sv), Turkish (tr)

Text Analysis Wizard

bleveanalysis.couchbase.com

Discussion/Issues

Discuss usage/development of bleve and/or report issues here:

License

Apache License Version 2.0

About

A modern text/numeric/geo-spatial/vector indexing library for go

Resources

Contributing

Security policy

Stars

11.2k stars

Watchers

224 watching

Forks

Releases

Used by

Contributors

Languages