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:
- query on multiple fields i.e. having multiple logical AND, OR conditions
- sort the result on multiple fields
- 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