bleve README

The project's README from github.com/blevesearch/bleve. As one markdown file: README.md.

bleve bleve

Tests Coverage Status Go Reference Join the chat Go Report Card Sourcegraph License

A modern indexing + search library in GO

Features

Indexing

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)

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

bleve (blevesearch/bleve)

Searching Database…

11.2K ·GitHub
What is this?Bleve is a modern full-text, numeric, geo-spatial, and vector indexing and search library written in Go, inspired by Apache Lucene.
Is this a library or a standalone search server?It is a Go library you embed directly in your application, though it also ships a CLI tool for basic index operations.
How do I add it to a project?Import the bleve package into your Go code to create and query indexes; a separate CLI binary can also be installed for the latest release.
Do I need anything besides Go to use it?No external database or server is required; bleve indexes data directly on disk using its own storage engine (scorch), so you only need a Go environment.
Does it support combining keyword and vector search?Yes, it supports hybrid search combining exact (keyword) and semantic (vector) matches, with RRF or RSF result fusion.
What field and query types does bleve support?It supports text, number, datetime, boolean, geopoint, geoshape, IP, and vector fields, with query types including term, phrase, match, fuzzy, range, wildcard, boolean compound queries, and query string syntax.
Can bleve do geo-spatial and nearest-neighbor searches?Yes, it supports geo-spatial search and approximate k-nearest neighbors via vector search, plus synonym and hierarchical nested search.
Which languages are supported for text analysis?Bleve ships built-in analyzers for about 30 languages including English, Chinese-Japanese-Korean, Arabic, Russian, German, French, Hindi, and more, in addition to customizable general-purpose analyzers.
Does bleve support ranking and highlighting?Yes, it provides tf-idf and BM25 scoring models, query-time boosting, result pagination, and match highlighting with document fragments.
Size
18.1 MB
Stars
11.2K
Age
12y
Commits · 90 Days