fix mongo hasher

This commit is contained in:
Barak Michener 2014-08-13 13:29:08 -04:00
parent 104e7d110d
commit 03798bc4fa
2 changed files with 27 additions and 23 deletions

View file

@ -185,13 +185,13 @@ func (it *Iterator) Contains(v graph.Value) bool {
case quad.Subject:
offset = 0
case quad.Predicate:
offset = (it.qs.hasher.Size() * 2)
offset = (it.qs.hasher_size * 2)
case quad.Object:
offset = (it.qs.hasher.Size() * 2) * 2
offset = (it.qs.hasher_size * 2) * 2
case quad.Label:
offset = (it.qs.hasher.Size() * 2) * 3
offset = (it.qs.hasher_size * 2) * 3
}
val := v.(string)[offset : it.qs.hasher.Size()*2+offset]
val := v.(string)[offset : it.qs.hasher_size*2+offset]
if val == it.hash {
it.result = v
return graph.ContainsLogOut(it, v, true)