Expand my Community achievements bar.

SOLVED

Special Characters Search using Querybuilder

Avatar

Level 2

Hi All,

I have a query regarding the search in JCR:content,

1. In the AEM using QueryBuilder. When I try searching with keyword "

KalmKap®" the trademark symbols are not getting searched. Instead of that it is searching for the keyword "Kalmkap".

2. The special characters like "[", "]", "{", "}", and many..... my search is not working...

Below is my Query::

group.1_fulltext.relPath=jcr:content/@jcr:title

group.1_fulltext=[KalmKap]

group.1_fulltext.relPath=jcr:content/@jcr:title

group.1_fulltext=KalmKap®

kindly help me out on this........

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If you want to do this only with QueryBuilder then create custom predicate

e.g.

Code:

aem63app-repo/CaseInsensitiveLikePredicate.java at master · arunpatidar02/aem63app-repo · GitHub

Query

path=/content/we-retail/us/en/products

caseinsensitive.property=jcr:content/@jcr:title

caseinsensitive.value=%portland®%

Screen Shot 2018-08-20 at 8.21.57 PM.png



Arun Patidar

View solution in original post

24 Replies

Avatar

Correct answer by
Community Advisor

If you want to do this only with QueryBuilder then create custom predicate

e.g.

Code:

aem63app-repo/CaseInsensitiveLikePredicate.java at master · arunpatidar02/aem63app-repo · GitHub

Query

path=/content/we-retail/us/en/products

caseinsensitive.property=jcr:content/@jcr:title

caseinsensitive.value=%portland®%

Screen Shot 2018-08-20 at 8.21.57 PM.png



Arun Patidar

Avatar

Level 10

Nice suggestion and a correct answer

Avatar

Level 2

Thanks Arun Patidar​ The above worked well... I'm able to fetch all the expected results....

Still I'm stuck at one point. How can I limit the search result in XPath, like "guessTotal" in queryBuilder.

Avatar

Community Advisor

Hi,

JCR XPATH only support few function, If you want better control over searching and querying the JCR, then use the JCR API SQL2 or the Query Builder



Arun Patidar