0
0
Fork 0

Minor change in example code in README

This commit is contained in:
Nimish Gupta 2015-02-17 11:40:07 +05:30
parent afbda14dc2
commit 1ce81c2f85
1 changed files with 7 additions and 4 deletions

View File

@ -28,9 +28,9 @@ Discuss usage and development of bleve in the [google group](https://groups.goog
## Indexing
message := struct{
Id string,
From string,
Body string,
Id string
From string
Body string
}{
Id: "example",
From: "marty.schoch@gmail.com",
@ -38,7 +38,10 @@ Discuss usage and development of bleve in the [google group](https://groups.goog
}
mapping := bleve.NewIndexMapping()
index, _ := bleve.New("example.bleve", mapping)
index, err := bleve.New("example.bleve", mapping)
if err != nil {
panic(err)
}
index.Index(message.Id, message)
## Querying