Merge pull request #161 from nimishzynga/master
Minor change in example code in README
This commit is contained in:
commit
251e4717a2
11
README.md
11
README.md
@ -28,9 +28,9 @@ Discuss usage and development of bleve in the [google group](https://groups.goog
|
|||||||
## Indexing
|
## Indexing
|
||||||
|
|
||||||
message := struct{
|
message := struct{
|
||||||
Id string,
|
Id string
|
||||||
From string,
|
From string
|
||||||
Body string,
|
Body string
|
||||||
}{
|
}{
|
||||||
Id: "example",
|
Id: "example",
|
||||||
From: "marty.schoch@gmail.com",
|
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()
|
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)
|
index.Index(message.Id, message)
|
||||||
|
|
||||||
## Querying
|
## Querying
|
||||||
|
Loading…
Reference in New Issue
Block a user