github.com/vench/word_index@v0.3.1/README.md (about)

     1  # Word index
     2  
     3  Quick search for keywords in documents.
     4  
     5  
     6  Example find key word in document.
     7  
     8  ```
     9  documents = []string{
    10  		`Sorry. We’re having trouble getting your pages back.`,
    11  		`Still not able to restore your session?`,
    12  		`Our Dockerfile will have two section.`,
    13  		`Quick search for keywords in documents.`,
    14  }
    15  
    16  index := NewIndexBin()
    17  index.Add(documents...)
    18  i := index.Find(`key*`)
    19  if i != -1 {
    20      println(documents[i])
    21  }
    22  ```
    23  
    24  ### TODO
    25  
    26  [ ] bin operations