Skip to content

Commit

Permalink
Merge pull request #397 from RedisLabsModules/ld-percent
Browse files Browse the repository at this point in the history
Allow LD of up to 3 with fuzzy matching via %-repetition
  • Loading branch information
mnunberg committed Jul 27, 2018
2 parents 66ae7fc + ae65cb0 commit b149894
Show file tree
Hide file tree
Showing 3 changed files with 442 additions and 402 deletions.
1 change: 1 addition & 0 deletions src/pytest/test_fuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def testLdLimit(self):
self.cmd('ft.add', 'idx', 'doc1', 1.0, 'fields', 'title', 'hello world')
self.assertEqual([1L, 'doc1', ['title', 'hello world']], self.cmd('ft.search', 'idx', '%word%')) # should be ok
self.assertEqual([0L], self.cmd('ft.search', 'idx', r'%sword%')) # should return nothing
self.assertEqual([1L, 'doc1', ['title', 'hello world']], self.cmd('ft.search', 'idx', r'%%sword%%'))

def testFuzzyMultipleResults(self):
r = self
Expand Down
Loading

0 comments on commit b149894

Please sign in to comment.