Setting Excerpt (hit.getExcerpt) true for huge volume of PDFs is making search query really slow | Community
Skip to main content
abhishekk981269
Level 2
August 23, 2020
Question

Setting Excerpt (hit.getExcerpt) true for huge volume of PDFs is making search query really slow

  • August 23, 2020
  • 1 reply
  • 3175 views

We have implemented custom search using query builder for Pages and Assets. When i set 

p.excerpt = true, I get all the information of excerpt for both pages and assets (pdfs mainly) but query gets super slow.

The query works as excepted (faster) if I just set the  excerpt for Pages but as soon as i use it for assets, it gets slow.

Is there any way to extract excerpt for huge volume of assets faster through querybuilder search.

 

(/jcr:root/content/xxx/us/en//element(*, cq:Page)[(jcr:contains(., 'xyz') and not(jcr:content/@isNotSearchable))] | /jcr:root/content/dam/xxx/documents//element(*, dam:Asset)[(jcr:contains(., 'xyz') )])/rep:excerpt(.)

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Shashi_Mulugu
Community Advisor
Community Advisor
August 24, 2020

@abhishekk981269  Few questions to guide you better, What version of AEM are your using? What are doing with excerpts?

abhishekk981269
Level 2
August 24, 2020

Hi Shashi, it is aem 6.5.4

I am trying to highlight search results (full text search)

This is how i am fetching it in code (The query is mentioned in original post):

hit.getExcerpt()

The code returns the excerpt as expected but the query gets super slow if i put  p.excerpt = true for Assets

  • Our Assets (pdfs) are around 4-5 GB 

@shashi_mulugu