How to Search Excerpt from QueryBuilder? | Community
Skip to main content
ChaoXiong
Level 2
Mar 26, 2019 3:29 AM UTC
Solved

How to Search Excerpt from QueryBuilder?

I want search like this;

I try test like

map.put("path", "/content"));

map.put("fulltext","geo");

Query query = queryBuilder.createQuery(PredicateGroup.create(params), session);

SearchResult result= query.getResult();

for (Hit hit : result.getHits()) {

   Map<String, String> excerpts = hit .getExcerpts();
}

but excerpts is null;

what should I do?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 26, 2019 11:22 PM UTC

It is picking up excerpts otherwise it wouldn't highlight "geo" in the results. this is something else

check  aem 6.2 querybuilder api not returning results  or debug the code

Adobe Experience Manager Help | Creating a HTML Template Language component that uses the AEM QueryBuilder API

1 reply

Gaurav-Behl
Gaurav-BehlAccepted solution
Level 10
Mar 26, 2019 11:22 PM UTC

It is picking up excerpts otherwise it wouldn't highlight "geo" in the results. this is something else

check  aem 6.2 querybuilder api not returning results  or debug the code

Adobe Experience Manager Help | Creating a HTML Template Language component that uses the AEM QueryBuilder API

Translate