Skip to content

Commit

Permalink
updated index
Browse files Browse the repository at this point in the history
  • Loading branch information
harshil-goel committed Jan 27, 2025
1 parent 1386cc5 commit 3759fcb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions worker/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ func runMutation(ctx context.Context, edge *pb.DirectedEdge, txn *posting.Txn) e
// just create a posting list facade in memory and use it to store the delta in Badger. Later,
// the rollup operation would consolidate all these deltas into a posting list.
isList := su.GetList()
hasIndex := (len(su.GetTokenizer()) > 0 || su.GetCount())
var getFn func(key []byte) (*posting.List, error)
switch {
case len(edge.Lang) == 0 && !isList:
getFn = txn.GetScalarList
case len(edge.Lang) > 0 || hasIndex && su.GetValueType() == pb.Posting_UID:
case len(edge.Lang) > 0 || su.GetCount():
// Any index or count index.
getFn = txn.Get
case edge.Op == pb.DirectedEdge_DEL:
Expand Down

0 comments on commit 3759fcb

Please sign in to comment.