modern text indexing in go - blevesearch.com
- 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
- Conjunction, Disjunction, Boolean
- Numeric Range, Date Range
- Simple query syntax for human entry
- Search result match highlighting
Discuss usage and development of bleve in the google group.
message := struct{
From: "marty.schoch@gmail.com",
Body: "bleve indexing is easy",
}
mapping := bleve.NewIndexMapping()
index, _ := bleve.New("example.bleve", mapping)
index.Index(message)
index, _ := bleve.Open("example.bleve")
query := bleve.NewSyntaxQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)