A modern text indexing library for go

Marty Schoch b9db744def add validtion which checks the type of char/token filters 2 years ago
analysis b9db744def add validtion which checks the type of char/token filters 2 years ago
cmd 9ca14d29f1 use cobra command Annotations to identify mutating commands 2 years ago
config 63c0d9a4d2 renamed detect_lang to detectlang 2 years ago
docs 2332455bd2 nicer formatting of license header 3 years ago
document 2332455bd2 nicer formatting of license header 3 years ago
http 2f48d7fb02 fix misspellings 3 years ago
index 74c7de0dcf re-order childSnapshot declaration 2 years ago
mapping 3b2bc30b54 fix type identification when object indexed is pointer to struct 2 years ago
numeric 2332455bd2 nicer formatting of license header 3 years ago
registry 2a8237e8cc optimize FacetsBuilder with cached fields & avoid some allocs 3 years ago
search f391b991c2 improve query string compatibility 2 years ago
test a5d1d7974c add query support for multi-phrase 2 years ago
vendor 134f7b7479 update moss gvt manifest for SeekTo() API 3 years ago
.gitignore 9ec2ddd757 initial refactor of query into separate package 3 years ago
.travis.yml bd2a23fb6d remove firestorm index scheme 3 years ago
CONTRIBUTING.md 2807a2c8bd adding CONTRIBUTING.md to repo 3 years ago
LICENSE 6e7aa57b52 adding license file 5 years ago
README.md ea397a24ac Apache2 license badge 2 years ago
config.go 2332455bd2 nicer formatting of license header 3 years ago
config_app.go 2332455bd2 nicer formatting of license header 3 years ago
config_disk.go 2332455bd2 nicer formatting of license header 3 years ago
doc.go 2332455bd2 nicer formatting of license header 3 years ago
error.go 2332455bd2 nicer formatting of license header 3 years ago
examples_test.go 2dc2130633 additional golint cleanups 3 years ago
index.go 414d21a541 Add comment about JSON serialization of kvconfig 3 years ago
index_alias.go 2332455bd2 nicer formatting of license header 3 years ago
index_alias_impl.go 89a1cefde1 API change: optional SearchRequest.IncludeLocations flag 2 years ago
index_alias_impl_test.go dc2b6cd656 simplified MultiSearch requires that indexes honor context deadlines 3 years ago
index_impl.go 89a1cefde1 API change: optional SearchRequest.IncludeLocations flag 2 years ago
index_meta.go 2332455bd2 nicer formatting of license header 3 years ago
index_meta_test.go 2332455bd2 nicer formatting of license header 3 years ago
index_stats.go 2332455bd2 nicer formatting of license header 3 years ago
index_test.go 8096d9fb90 remove use of float64 to represent int things 2 years ago
mapping.go 2332455bd2 nicer formatting of license header 3 years ago
query.go 11f18333fb Settle on default fuzziness of 1 (for now) 3 years ago
search.go 78686c3fa3 MB-20793 : Validation for min/max/start/end params for numeric/date range facets 2 years ago
search_test.go 029d4c73d9 clean up of unit test. 2 years ago

README.md

bleve bleve

Build Status Coverage Status GoDoc 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