Get returns the value of `key` which is found by `SlimIndex.DataReader`, and a bool value indicating if the `key` is found or not.
(key string)
| 69 | // Get returns the value of `key` which is found by `SlimIndex.DataReader`, and |
| 70 | // a bool value indicating if the `key` is found or not. |
| 71 | func (si *SlimIndex) Get(key string) (string, bool) { |
| 72 | o, found := si.SlimTrie.Get(key) |
| 73 | if !found { |
| 74 | return "", false |
| 75 | } |
| 76 | |
| 77 | offset := o.(int64) |
| 78 | |
| 79 | return si.DataReader.Read(offset, key) |
| 80 | } |
| 81 | |
| 82 | // RangeGet returns the value of `key` that is contained in a range, |
| 83 | // and a bool value indicating if the `key` is found or not. |