A modern text indexing library for go. (this is a mirror of the github repository)
http://www.blevesearch.com/
c526a38369
ultimately this is make it more convenient for us to wire up different elements of the analysis pipeline, without having to preload everything into memory before we need it separately the index layer now has a mechanism for storing internal key/value pairs. this is expected to be used to store the mapping, and possibly other pieces of data by the top layer, but not exposed to the user at the top. |
||
---|---|---|
analysis | ||
docs | ||
document | ||
examples | ||
http | ||
index | ||
numeric_util | ||
registry | ||
samples/beer-sample | ||
search | ||
utils | ||
.gitignore | ||
LICENSE | ||
README.md | ||
byte_array_converter.go | ||
config.go | ||
error.go | ||
genparser.sh | ||
index.go | ||
index_impl.go | ||
index_test.go | ||
mapping_document.go | ||
mapping_field.go | ||
mapping_index.go | ||
mapping_test.go | ||
query.go | ||
query_boolean.go | ||
query_conjunction.go | ||
query_date_range.go | ||
query_disjunction.go | ||
query_match.go | ||
query_match_all.go | ||
query_match_none.go | ||
query_match_phrase.go | ||
query_numeric_range.go | ||
query_phrase.go | ||
query_prefix.go | ||
query_syntax.go | ||
query_syntax.nex | ||
query_syntax.nn.go | ||
query_syntax.y | ||
query_syntax_parser.go | ||
query_syntax_parser_test.go | ||
query_term.go | ||
reflect.go | ||
search.go | ||
y.go |
README.md
bleve
modern text indexing in go
Features
- Index any go data structure (including JSON)
- Intelligent defaults backed up by powerful configuration
- Supported field types:
- Text
- Supported query types:
- Term, Phrase, Match, Match Phrase
- Conjunction, Disjunction, Boolean
- Simple query syntax for human entry
- Search result match highlighting
Indexing
message := struct{
From: "marty.schoch@gmail.com",
Body: "bleve indexing is easy",
}
mapping := bleve.NewIndexMapping()
index, _ := bleve.Open("example.bleve", mapping)
index.IndexId(message)
Querying
mapping := bleve.NewIndexMapping()
index, _ := bleve.Open("example.bleve", mapping)
query := bleve.NewSyntaxQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)