A modern text indexing library for go
|
2 weeks ago | |
---|---|---|
.github | 3 months ago | |
analysis | 2 months ago | |
cmd | 1 month ago | |
config | 1 year ago | |
data | 10 months ago | |
docs | 6 years ago | |
document | 6 months ago | |
geo | 10 months ago | |
http | 4 months ago | |
index | 2 months ago | |
mapping | 2 months ago | |
numeric | 4 years ago | |
registry | 7 months ago | |
search | 4 months ago | |
size | 5 years ago | |
test | 4 months ago | |
.gitignore | 1 year ago | |
.travis.yml | 3 years ago | |
CONTRIBUTING.md | 7 years ago | |
LICENSE | 9 years ago | |
README.md | 4 months ago | |
SECURITY.md | 1 year ago | |
builder.go | 2 years ago | |
builder_test.go | 4 months ago | |
config.go | 2 years ago | |
config_app.go | 1 year ago | |
config_disk.go | 1 year ago | |
doc.go | 4 months ago | |
error.go | 2 years ago | |
examples_test.go | 1 year ago | |
go.mod | 2 weeks ago | |
go.sum | 2 weeks ago | |
index.go | 4 months ago | |
index_alias.go | 6 years ago | |
index_alias_impl.go | 6 months ago | |
index_alias_impl_test.go | 2 years ago | |
index_impl.go | 6 months ago | |
index_meta.go | 4 months ago | |
index_meta_test.go | 6 years ago | |
index_stats.go | 6 years ago | |
index_test.go | 4 months ago | |
mapping.go | 7 months ago | |
query.go | 1 year ago | |
query_bench_test.go | 6 months ago | |
search.go | 3 months ago | |
search_test.go | 2 months ago |
modern text indexing in go - blevesearch.com
message := struct{
Id string
From string
Body string
}{
Id: "example",
From: "marty.schoch@gmail.com",
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)
index, _ := bleve.Open("example.bleve")
query := bleve.NewQueryStringQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)
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.
Discuss usage/development of bleve and/or report issues here:
Apache License Version 2.0