Skip to content

Document examples of filtering output in an operation chain #276

Open
@n3101

Description

@n3101

Today a user asked for help constructing an operation chain where the returned results were filtered using an OR predicate. @GCHQDev404 constructed the code fragment below; which may be useful when rewriting the doc for Gaffer 2.0:

{
  "class" : "uk.gov.gchq.gaffer.operation.OperationChain",
  "operations" : [ {
    "class" : "uk.gov.gchq.gaffer.operation.impl.get.GetAllElements"
  }, {
    "class" : "uk.gov.gchq.gaffer.operation.impl.function.Filter",
    "edges" : {
      "edgeGroupName" : {
        "predicates" : [ {
          "selection" : [ "selection1" ],
          "predicate" : {
            "class" : "uk.gov.gchq.koryphe.impl.predicate.Or",
            "predicates" : [ {
              "class" : "uk.gov.gchq.koryphe.impl.predicate.CollectionContains",
              "value" : 1111
            }, {
              "class" : "uk.gov.gchq.koryphe.impl.predicate.CollectionContains",
              "value" : 3333
            } ]
          }
        } ]
      }
    }
  } ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new feature/component for the documentation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions