order User completions by last spoken

This commit is contained in:
Aviral Dasgupta 2017-02-10 22:34:52 +05:30
parent c7d0652762
commit 0653343319
No known key found for this signature in database
GPG key ID: 5FD1E9F4FFD3DA80
5 changed files with 109 additions and 16 deletions

View file

@ -14,7 +14,12 @@ class KeyMap {
const DEFAULT_RESULT_COUNT = 10;
const DEFAULT_DISTANCE = 5;
export default class FuzzyMatcher {
// FIXME Until Fuzzy matching works better, we use prefix matching.
import PrefixMatcher from './QueryMatcher';
export default PrefixMatcher;
class FuzzyMatcher {
/**
* Given an array of objects and keys, returns a KeyMap
* Keys can refer to object properties by name and as in JavaScript (for nested properties)