How to Search Excerpt from QueryBuilder?

熊超

25-03-2019

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?

Answers (0)