fix mongo indexing name mismatch
This commit is contained in:
parent
f967b36f84
commit
d2026ea271
2 changed files with 12 additions and 28 deletions
|
|
@ -45,17 +45,7 @@ type Iterator struct {
|
|||
func NewIterator(qs *TripleStore, collection string, d quad.Direction, val graph.Value) *Iterator {
|
||||
name := qs.NameOf(val)
|
||||
|
||||
var constraint bson.M
|
||||
switch d {
|
||||
case quad.Subject:
|
||||
constraint = bson.M{"Subject": name}
|
||||
case quad.Predicate:
|
||||
constraint = bson.M{"Predicate": name}
|
||||
case quad.Object:
|
||||
constraint = bson.M{"Object": name}
|
||||
case quad.Label:
|
||||
constraint = bson.M{"Label": name}
|
||||
}
|
||||
constraint := bson.M{d.String(): name}
|
||||
|
||||
size, err := qs.db.C(collection).Find(constraint).Count()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue