EncodeContainingInvertedIndexSpans takes in a key prefix and returns the spans that must be scanned in the inverted index to evaluate a contains (@>) predicate with the given JSON (i.e., find the objects in the index that contain the given JSON). The spans are returned in an inverted.SpanExpression
( b []byte, json JSON, )
| 1075 | // |
| 1076 | // The input inKey is prefixed to the keys in all returned spans. |
| 1077 | func EncodeContainingInvertedIndexSpans( |
| 1078 | b []byte, json JSON, |
| 1079 | ) (invertedExpr inverted.Expression, err error) { |
| 1080 | return json.encodeContainingInvertedIndexSpans( |
| 1081 | encoding.EncodeJSONAscending(b), true /* isRoot */, false, /* isObjectValue */ |
| 1082 | ) |
| 1083 | } |
| 1084 | |
| 1085 | // EncodeContainedInvertedIndexSpans takes in a key prefix and returns the |
| 1086 | // spans that must be scanned in the inverted index to evaluate a contained by |
nothing calls this directly
no test coverage detected
searching dependent graphs…