Content Fragment Search using GraphQL
I have a content Fragment with these fields
Title, Page Title, Canonical URL, Description, tags
I am using AEM AMS 6.5 setup. I need to create a GraphQL query for searching a word, say "Service" in multiple fields
example: serach word might be present in either of above mentioned CF fields.
I heard, there is AMS limitation that we cannot use OR or in statmeents. Where as this is possible in AEMaaCS. Also, I want to search the word in tags. But CF stores tag path. Actual Tag title is present in /content/cq:tags So, using GraphQL query, is it possible to search the word to Tag title?
query SearchContent($searchTerm: String!, $limit: Int = 10) {
myModelName(
filter: {
title: {
_expressions: [
{ _operator: CONTAINS, value: $searchTerm }
]
}
OR
description: {
_expressions: [
{ _operator: CONTAINS, value: $searchTerm }
]
}
_path: {
_expressions: [
{ _operator: STARTS_WITH, value: "/content/dam/abcd" }
]
}
}
limit: $limit
) {
items {
description
title
}
}
}cc @arunpatidar @shashi_mulugu @raja_reddy @saravanan_dharmaraj @sureshdhulipudi
Thanks in advacne