Merge pull request #528 from bfontaine/syntax
README: Use go syntax highlighting
This commit is contained in:
commit
50c43bfef6
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user