Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Excerpt from QueryBuilder api for Dam:Asset

Avatar

Avatar
Validate 10
Level 1
vishalv75424481
Level 1

Likes

0 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
View profile

Avatar
Validate 10
Level 1
vishalv75424481
Level 1

Likes

0 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
View profile
vishalv75424481
Level 1

15-10-2015

I want to get the excerpt(5 words before and after the search term) for the given fulltext search. I am trying hit.getExceprt() and it returns null. I know that I can set the excerpt properties in web console, but we can only set the jcr:properties there and I am not sure how to specify the content to include in the excerpt. 

I also read that you can write a query in the indexer to index the summary. I am not sure how this is done and if it is the best approach.

Please help.

View Entire Topic

Avatar

Avatar
Validate 10
Level 1
vishalv75424481
Level 1

Likes

0 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
View profile

Avatar
Validate 10
Level 1
vishalv75424481
Level 1

Likes

0 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
View profile
vishalv75424481
Level 1

15-10-2015

Thanks bsloki,

Please find below the search query

map.put("path", properties.get("searchPath", searchPath));
map.put("type","dam:Asset");
map.put("fulltext",searchTerm);
map.put("p.offset", ""+x);
map.put("p.limit", ""+noOfResultsPerPage);

map.put(groupTagId,"tag_id" );

map.put(groupTagIdProperty,"jcr:content/metadata/cq:tags");