1

In the example below: https://docs.rws.com/816112/933327/sdl-tridion-sites-9-5-main-documentation/graphql-requests-using-boolean-expressions-with-more-than-two-operands A combination of two-operand Boolean expression with a third operand are used to form a three-operand Boolean expression. Something like: A or (B and C) Where A, B and C are Boolean expressions

Is it possible to use groupBy to have two three-operand Boolean expressions grouped by or operator. Something like: (A and B and C) or (D and E and F) Where A, B, C, D, E and F are Boolean expressions

I'm trying to implement such query to get results based on two item types: Page and Component. Page, where I can search in page and its components indexed content. And Component where I can search in binary components (PDF documents). So I have the following query:

{
  searchByCriteria(
        sortBy: {fields:["modifiedDate"], sortAsText: false, sortingDirection: DESCENDING},
        criteria: {
        field: "itemType",
            value: "page",
            and: {
              groupBy: {
                field: "dynamic+appearinsearch",
                value: "yes",
                and: {
                  groupBy: {
                    field: "content+english",   
                    value: "Governance",
                    or: {
                      groupBy: {
                        field: "itemType",                      
                          value: "component",
                          and: {
                            groupBy: {
                              field: "binaryContentType",       
                                value: "application"
                              and: {
                                field: "content+general",       
                                    value: "Governance"
                              }
                            } 
                          }
                      }
                    }
                  }
                }
              }
            }
    }) {
....
....
....
  }
}

For above query I'm only getting results for the first three-operand boolean expression, like the other one after or operator is totally ignored.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.