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

SearchResult.getFacets() is null for query builder with map even after adding p.facets=true

Avatar

Avatar
Level 1
maheshbabuvoma
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
maheshbabuvoma
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
maheshbabuvoma
Level 1

12-04-2021

I tried with query debug console and when I click on  Extract facets checkbox I was able to get response. But I need make call through java Query Builder API.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

373 likes

Total Posts

480 posts

Correct Reply

133 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

373 likes

Total Posts

480 posts

Correct Reply

133 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile
asutosh_jena
Level 10

12-04-2021

Hi @maheshbabuvoma 

 

Try with the below code:

final PredicateGroup predicates = PredicateConverter.createPredicates(predicatesMap);
final Query query = queryBuilder.createQuery(predicates, resourceResolver.adaptTo(Session.class));
query.setExcerpt(Boolean.TRUE);
final SearchResult result = query.getResult();

 

Make sure to use resourceResolver with appropriate privilage, service user is preferred.

 

Thanks! 

Answers (1)

Answers (1)

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

106 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

106 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

12-04-2021

Hi @maheshbabuvoma can you please the piece of code(java) you're using to fetch the results ? I bet the issue is in your java code.

 

Thanks,

Bilal.