rode / grafeas-elasticsearch

An implementation of the Grafeas storage backend based on Elasticsearch
Apache License 2.0
12 stars 5 forks source link

Order of operations in filtering #86

Closed pickjasmine closed 3 years ago

pickjasmine commented 3 years ago

can we specify parentheses around a statement (like happening in searching for resources) so we can do filtering likename && (type1 ||type 2)

mrparkers commented 3 years ago

Looks like parens are already supported by the filtering package. Turns out cel will handle this for us when parsing the expression. For example, this filter on ListOccurrences produces what you'd probably expect:

"resource.uri".startsWith("git") && ("kind" == "DISCOVERY" || "kind" == "BUILD")