Skip to content

blevesearch/bleve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5426dde · May 22, 2020
Apr 20, 2020
May 22, 2020
Apr 5, 2020
Jul 2, 2019
Oct 2, 2016
Aug 12, 2019
Apr 2, 2020
Dec 11, 2017
May 22, 2020
May 7, 2020
Mar 26, 2019
Oct 25, 2016
May 20, 2020
Apr 24, 2018
May 22, 2020
Sep 29, 2016
Apr 2, 2020
Jun 26, 2016
Apr 17, 2014
Apr 20, 2020
May 12, 2020
May 12, 2020
Jan 5, 2018
Oct 2, 2016
Oct 2, 2016
Oct 2, 2016
Oct 2, 2016
Oct 2, 2016
May 22, 2020
May 12, 2020
Oct 2, 2016
May 19, 2020
Apr 29, 2020
May 29, 2019
Aug 10, 2018
Oct 2, 2016
Oct 2, 2016
May 1, 2020
Mar 25, 2017
Nov 21, 2017
Jun 10, 2019
May 7, 2020

Repository files navigation

bleve bleve

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

modern text indexing in go - blevesearch.com

Try out bleve live by searching the bleve website.

Features

  • Index any go data structure (including JSON)
  • Intelligent defaults backed up by powerful configuration
  • Supported field types:
    • Text, Numeric, Date
  • Supported query types:
    • Term, Phrase, Match, Match Phrase, Prefix
    • Conjunction, Disjunction, Boolean
    • Numeric Range, Date Range
    • Simple query syntax for human entry
  • tf-idf Scoring
  • Search result match highlighting
  • Supports Aggregating Facets:
    • Terms Facet
    • Numeric Range Facet
    • Date Range Facet

Discussion

Discuss usage and development of bleve in the google group.

Indexing

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)

Querying

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

License

Apache License Version 2.0