0
0

Merge pull request #528 from bfontaine/syntax

README: Use go syntax highlighting
This commit is contained in:
Marty Schoch 2017-02-04 09:52:58 -05:00 committed by GitHub
commit 50c43bfef6

View File

@ -33,6 +33,7 @@ Discuss usage and development of bleve in the [google group](https://groups.goog
## Indexing
```go
message := struct{
Id string
From string
@ -49,13 +50,16 @@ Discuss usage and development of bleve in the [google group](https://groups.goog
panic(err)
}
index.Index(message.Id, message)
```
## Querying
```go
index, _ := bleve.Open("example.bleve")
query := bleve.NewQueryStringQuery("bleve")
searchRequest := bleve.NewSearchRequest(query)
searchResult, _ := index.Search(searchRequest)
```
## License