2014-07-31 16:58:20 +02:00
|
|
|
# ![bleve](docs/bleve.png) bleve
|
2014-04-17 22:55:53 +02:00
|
|
|
|
2014-08-19 22:31:45 +02:00
|
|
|
modern text indexing in go - [blevesearch.com](http://www.blevesearch.com/)
|
2014-07-31 16:58:20 +02:00
|
|
|
|
|
|
|
## Features
|
|
|
|
* Index any go data structure (including JSON)
|
|
|
|
* Intelligent defaults backed up by powerful configuration
|
|
|
|
* Supported field types:
|
2014-08-19 22:21:18 +02:00
|
|
|
* Text, Numeric, Date
|
2014-07-31 16:58:20 +02:00
|
|
|
* Supported query types:
|
|
|
|
* Term, Phrase, Match, Match Phrase
|
|
|
|
* Conjunction, Disjunction, Boolean
|
2014-08-19 22:21:18 +02:00
|
|
|
* Numeric Range, Date Range
|
2014-07-31 16:58:20 +02:00
|
|
|
* Simple query syntax for human entry
|
|
|
|
* Search result match highlighting
|
|
|
|
|
2014-08-19 22:31:45 +02:00
|
|
|
## Discussion
|
|
|
|
|
|
|
|
Discuss usage and development of bleve in the [google group](https://groups.google.com/forum/#!forum/bleve).
|
|
|
|
|
2014-07-31 16:58:20 +02:00
|
|
|
## Indexing
|
|
|
|
|
|
|
|
message := struct{
|
|
|
|
From: "marty.schoch@gmail.com",
|
|
|
|
Body: "bleve indexing is easy",
|
|
|
|
}
|
|
|
|
|
|
|
|
mapping := bleve.NewIndexMapping()
|
2014-08-20 22:58:20 +02:00
|
|
|
index, _ := bleve.New("example.bleve", mapping)
|
2014-08-19 22:21:18 +02:00
|
|
|
index.Index(message)
|
2014-04-18 19:52:38 +02:00
|
|
|
|
2014-07-31 16:58:20 +02:00
|
|
|
## Querying
|
|
|
|
|
2014-08-20 22:58:20 +02:00
|
|
|
index, _ := bleve.Open("example.bleve")
|
2014-07-31 16:58:20 +02:00
|
|
|
query := bleve.NewSyntaxQuery("bleve")
|
|
|
|
searchRequest := bleve.NewSearchRequest(query)
|
|
|
|
searchResult, _ := index.Search(searchRequest)
|
2014-08-29 16:34:15 +02:00
|
|
|
|
|
|
|
## License
|
2014-07-31 16:58:20 +02:00
|
|
|
|
2014-08-29 16:34:15 +02:00
|
|
|
Apache License Version 2.0
|
2014-07-31 16:58:20 +02:00
|
|
|
|
|
|
|
## Status
|
|
|
|
|
2014-08-28 21:58:37 +02:00
|
|
|
[![Build Status](https://drone.io/github.com/blevesearch/bleve/status.png)](https://drone.io/github.com/blevesearch/bleve/latest)
|
2014-08-29 16:34:15 +02:00
|
|
|
[![Coverage Status](https://coveralls.io/repos/blevesearch/bleve/badge.png?branch=master)](https://coveralls.io/r/blevesearch/bleve?branch=master)
|