• Stars
    star
    9,964
  • Rank 3,513 (Top 0.07 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 10 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

bleve bleve

Tests Coverage Status GoDoc Join the chat at https://gitter.im/blevesearch/bleve codebeat Go Report Card Sourcegraph License

A modern text indexing library in go

Features

  • Index any go data structure (including JSON)
  • Intelligent defaults backed up by powerful configuration
  • Supported field types:
    • text, number, datetime, boolean, geopoint, geoshape, IP, vector
  • Supported query types:
  • tf-idf Scoring
  • Query time boosting
  • Search result match highlighting with document fragments
  • Aggregations/faceting support:
    • Terms Facet
    • Numeric Range Facet
    • Date Range Facet

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

More Repositories

1

vellum

A Go library implementing a FST (finite state transducer)
Go
182
star
2

bleve-explorer

An example app providing an HTTP/REST/JSON front-end to bleve
JavaScript
120
star
3

beer-search

example bleve application for indexing and search beers and breweries
JavaScript
90
star
4

segment

A Go library for performing Unicode Text Segmentation as described in Unicode Standard Annex #29
Go
88
star
5

hugoidx

An experimental app to build a Bleve search index from the pages of a Hugo site
JavaScript
59
star
6

blevex

Bleve Extensions
Go
46
star
7

bleve-mapping-ui

web-based UI editor for bleve index mappings
JavaScript
24
star
8

bleve-wiki-indexer

maintains a bleve index of markdown files in the specified directory, exposes search on port 8099
Go
24
star
9

snowballstem

Go stemmers generated by the Snowball project
Go
21
star
10

bleve-bench

A utility for benchmarking bleve performance under various configurations and workloads.
Go
15
star
11

bleve-hosted

A general purpose application which can be used to host read-only access to one or more Bleve indexes
Go
13
star
12

zapx

Zap file format compatible with a future version of Bleve
Go
10
star
13

sear

a Bleve index implementation designed for efficiently executing searches against a single document (or a sequence of documents one at a time)
Go
8
star
14

blevesearch.github.io-hugo

Hugo Source for blevesearch.github.io website
JavaScript
6
star
15

stempel

A Go implementation of the Stempel stemmer
Go
6
star
16

bleve_index_api

The Bleve internal index API
Go
5
star
17

zap

Zap segment plugin for Bleve Scorch indexes
Go
4
star
18

analysis-wizard

An interactive tool to explore text analysis behavior in Bleve
JavaScript
4
star
19

blevesearch.github.io

blevesearch website
HTML
3
star
20

gopherconin-search

A sample bleve application that indexes/searches the GopherCon India schedule
HTML
2
star
21

scorch_segment_api

The Scorch internal segment API
Go
2
star
22

upsidedown_store_api

The Upside Down key-value store API
Go
1
star
23

fosdem-search

bleve sample app to search FOSDEM schedule
JavaScript
1
star
24

fosdem15

Bleve presentation for FOSDEM'15
Go
1
star
25

gophercon15

Lightning talk given at GopherCon 15
Go
1
star