how to add atleast 1000 Excerpt characters while hitting the query builder? | Community
Skip to main content
keshava219
Level 3
September 30, 2022
Solved

how to add atleast 1000 Excerpt characters while hitting the query builder?

  • September 30, 2022
  • 1 reply
  • 808 views

I'm getting only limited of 100 characters (not sure on count ) on excerpts while getting hits.

how to add custom excerpts to get full description or to change to 400 characters atlease.

 

for (Hit hit : result.getHits()) {
SearchResultNode srnode = new SearchResultNode();

String excerpt = hit.getExcerpt();
log.info("excerpt::::::::::::::" + excerpt);

}

 

 

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 lukasz-m

Hi @keshava219,

Excerpt limit is 150 characters, it is not configurable. So probably the only option will be to create your own Hit implementation, that will support more than 150 characters. However that means you will have implement entire QueryBuilder on your own, to be able to use your custom Hit implementation.

Here are potential list of interfaces that you would need to implement:

However, I do not think this is a good idea.

Alternatively you can contact Adobe e.g. using Idea option via community and request characters limit for Excerpt to be configurable or extended.

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
September 30, 2022

Hi @keshava219,

Excerpt limit is 150 characters, it is not configurable. So probably the only option will be to create your own Hit implementation, that will support more than 150 characters. However that means you will have implement entire QueryBuilder on your own, to be able to use your custom Hit implementation.

Here are potential list of interfaces that you would need to implement:

However, I do not think this is a good idea.

Alternatively you can contact Adobe e.g. using Idea option via community and request characters limit for Excerpt to be configurable or extended.