search for text in content fragments ("search text containing in any property or associated tags in content fragments")
I am trying to do "search for text in a content fragment or tags associated with content fragments".
I was trying to understand how this https://github.com/Adobe-Marketing-Cloud/aem-guides/blob/master/simple-search-guide/core/src/main/java/com/adobe/aem/sample/simple/search/impl/SearchResultsImpl.java#L68
code doing search but could not get around how predicateresolver, searchprovider adding any predicates.
I assume below code is doing "any property contains search text" return the result node.
private void initModel() {
final long start = System.currentTimeMillis();
final Map<String, String> searchPredicates = predicateResolver.getRequestPredicates(request);
if (isSearchable()) {
com.day.cq.search.result.SearchResult result = searchProvider.search(resourceResolver, searchPredicates);
pagination = searchProvider.buildPagination(result, "Previous", "Next");
searchResults = searchProvider.buildSearchResults(result);
totalResults = computeTotalMatches(result);
timeTaken = result.getExecutionTimeMillis();
}
}
Any pointers on this. There are no predicateresolvers or factories given, so not sure how this code even constructs any predicates.
I am looking to see if there is a search api alredy build in aem or write query my self using aem predicates , query builder api to do "search text containing in any property or associated tags in content fragments"
Thanks.
Sri