How to Search Excerpt from QueryBuilder? | Community
Skip to main content
ChaoXiong
Level 2
March 26, 2019
Solved

How to Search Excerpt from QueryBuilder?

  • March 26, 2019
  • 1 reply
  • 1437 views

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.
Best answer by Gaurav-Behl

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
March 26, 2019

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