PathPredicateEvaluator search for two paths | Community
Skip to main content
Kreender
Level 2
January 24, 2018
Solved

PathPredicateEvaluator search for two paths

  • January 24, 2018
  • 1 reply
  • 1376 views

Hello

I have a really complex query using HashMap and the QueryBuilder, part of it has something like this:

        map.put("path", "/content");

        map.put("path.exact", "true"); // defaults to true

        map.put("path.flat", "true");

        map.put("path.self", "true");

I took that code from this page:
acs-aem-samples/SampleQueryBuilder.java at master · Adobe-Consulting-Services/acs-aem-samples · GitHub

this works as intended but I need my query to search for content in two possible paths, so it would be to search in two paths with an "OR" relationship. I haven't found any documentation on how to do that, any help will be appreciated.

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 rmahendra

Try this.

group.1_path=/content/x

group.2_path=/content/y

group.p.or=true

Query Builder API has more examples.

1 reply

rmahendra
Adobe Employee
rmahendraAdobe EmployeeAccepted solution
Adobe Employee
January 25, 2018

Try this.

group.1_path=/content/x

group.2_path=/content/y

group.p.or=true

Query Builder API has more examples.