Closed gabssnake closed 8 years ago
That is great, thank you.
If indexing by depth, what order should one expect for same-weight but different partial patterns? Is it insertion order?
test('bloom depth, partial match order', function (t) {
t.plan(1)
var instance = bloomrun({ indexing: 'depth' })
instance.add({ c: 'CCC' }, 1)
instance.add({ b: 'BBB' }, 2)
instance.add({ a: 'AAA' }, 3)
t.deepEqual(instance.list({ a: 'AAA', b: 'BBB', c: 'CCC', d: 'DDD' }), [ 1, 2, 3 ])
})
@gabssnake insertion by bucket order. Meaning, if your pattern overlaps with another, than it will be checked before the others. The truth is, sending messages that overlap multiple patterns is not a good idea and a code smell. Whatever the rule is, it is either a) highly inefficient or b) very hard to understand.
It’s Ok, not an actual use case, just poking around to understand. Thanks again for your time,
@gabssnake your questions/edge cases where really helpful!
Hello, thanks for this great module. I have encountered the following situation:
Passing test:
Failing => expected: [ 3, 1, 2, 4 ] actual: [ 3, 1, 4 ]
Failing => expected: [ 1 ] actual: [ 3 ]
Am I using this wrong?