Expand my Community achievements bar.

SOLVED

How to Search Excerpt from QueryBuilder?

Avatar

Level 3

I want search like this;
1718919_pastedImage_0.png

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?

1 Accepted Solution

Avatar

Correct answer by
Level 10

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 QueryB...

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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 QueryB...