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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

RegeX in Querybuilder

Avatar

Level 2

Hello,

Can i give regular expression for path.

If i have to search in a path /content/geometrixx/*/products.

Any pointers on this would be helpful.

Thanks,

Meenakshi

1 Accepted Solution

Avatar

Correct answer by
Employee

As mentioned earlier, regex is not supported for path in the querybuilder.

You can do following things:

1. Specify multiple paths (if there are not too many folder entries):

group.1_path=/content/geometrixx/abc/products

group.2_path=/content/geometrixx/def/products

2. Query base path, example - /content/geometrixx/ and fine tune your index using lucene indexes. You can also filter the query result sets later using Java 8 stream APIs

View solution in original post

0 Replies

Avatar

Community Advisor

I don't think you can give a regex for path . Please go through this documentation for more understanding on QueryBuilder Query Builder API .

Avatar

Level 10

These are not supported for paths but there are wildcard characters that can be used with other predicates like * , %

Avatar

Correct answer by
Employee

As mentioned earlier, regex is not supported for path in the querybuilder.

You can do following things:

1. Specify multiple paths (if there are not too many folder entries):

group.1_path=/content/geometrixx/abc/products

group.2_path=/content/geometrixx/def/products

2. Query base path, example - /content/geometrixx/ and fine tune your index using lucene indexes. You can also filter the query result sets later using Java 8 stream APIs