3

We are using Sites9.5 version and indexing schema field values into elastic search (ES). We are trying to use graphql to query elastic search index. Currently SDL provides following four methods to do that: searchById searchByField searchByCriteria searchByRawQuery

We have three requirements which needs to be achieved in single graphql call:

  1. query on multiple fields i.e. having multiple logical AND, OR conditions
  2. sort the result on multiple fields
  3. query on date range i.e. from date and to date. The date field is a custom date field on schema

Is there a way to achieve all these three conditions in single graphql query?

e.g. how graphql query will look like if we have to fulfill criteria like below: /search?query=path="//Building%20Blocks//Content//"+AND+metadata.componentstartdate="2019-01-01T00:00:00Z+TO+metadata.componentenddate=""2019-01-01T00:00:00Z"+OR+title="article"&?sort=field1:asc&sort=field2:desc&start=0&rows=10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.