type Index struct {
// contains filtered or unexported fields
}
Index provides efficient fuzzy search over a fixed set of records.
It is designed to return results at interactive speeds (tens of ms)
for hundreds of thousands of records.
NewIndex constructs a new index for the set of records.
Records are identified by indices in the records slice.
The ranking algorithm takes time proportional to the length of each record,
so the caller should truncate long record strings.
Search returns record IDs that match the query, ordered from most- to least-relevant.
The ranking algorithm takes time proportional to the length of the query,
so the caller should truncate long queries.