Skip to content

Commit

Permalink
update simple examples [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
vcaesar committed Nov 30, 2018
1 parent 49e57a4 commit 0155d08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions examples/simple/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ func main() {
rounded cards, new colors, and the 4 mysterious colored dots again`

// Add the document to the index, docId starts at 1
searcher.Index(1, types.DocData{Content: text})
searcher.Index(2, types.DocData{Content: text1})
searcher.Index(3, types.DocData{Content: text2})
searcher.Index("1", types.DocData{Content: text})
searcher.Index("2", types.DocData{Content: text1})
searcher.Index("3", types.DocData{Content: text2})

// Wait for the index to refresh
searcher.Flush()
Expand Down
6 changes: 3 additions & 3 deletions examples/simple/zh/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func main() {
text2 := "全片以上下扩展至IMAX 1.9:1的宽高比来呈现"

// 将文档加入索引,docId 从1开始
searcher.Index(1, types.DocData{Content: text})
searcher.Index(2, types.DocData{Content: text1})
searcher.Index(3, types.DocData{Content: text2})
searcher.Index("1", types.DocData{Content: text})
searcher.Index("2", types.DocData{Content: text1})
searcher.Index("3", types.DocData{Content: text2})

// 等待索引刷新完毕
searcher.Flush()
Expand Down

0 comments on commit 0155d08

Please sign in to comment.