blevesearch / bleve
- среда, 10 апреля 2019 г. в 00:17:16
Go
A modern text indexing library for go
blevemodern text indexing in go - blevesearch.com
Try out bleve live by searching the bleve website.
Discuss usage and development of bleve in the google group.
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)index, _ := bleve.Open("example.bleve")
query := bleve.NewQueryStringQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)Apache License Version 2.0