


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........
Arun_Patidar
MVP
Arun_Patidar
MVP
20-08-2018
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®%
Arun_Patidar
MVP
Arun_Patidar
MVP
03-08-2018
Hi,
I am not sure if this is the bug or design issue. But you can try same with SQL2 or QueryBuilder API.
In XPATH you can run like below:
/jcr:root/content/AEM63App/en//*
[
(jcr:contains(., 'KalmKap(®)?'))
]
Arun_Patidar
MVP
Arun_Patidar
MVP
21-08-2018
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
sai_kumart66079
sai_kumart66079
21-08-2018
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.
smacdonald2008
smacdonald2008
20-08-2018
Nice suggestion and a correct answer
Arun_Patidar
MVP
Arun_Patidar
MVP
20-08-2018
Hi,
fn:lower-case is not supported anymore with QueryBuilder.
Though you can use same with Xpath like below.
/jcr:root/content/we-retail/us/en/products//element(*, cq:Page)
[
(jcr:like(fn:lower-case(jcr:content/@jcr:title), '%portland®%'))
]
sai_kumart66079
sai_kumart66079
20-08-2018
Hi Arun,
Using like operator is case sensitive. Please provide any suggestion to make it case insensitive. I tried using
property=fn:lower-case(jcr:content/@jcr:title)
property.value=%kalmkap®%
property.operation=like
but it didn't generate the X-Path in query debugger and no results found.
Any suggestions for using query builder.
Thanks,
Sai Kumar.
sai_kumart66079
sai_kumart66079
06-08-2018
Thanks Techaspect Solutions, Arun Patidar...
Using like operator it is working as expected.
Thanks,
Sai.
Arun_Patidar
MVP
Arun_Patidar
MVP
06-08-2018
Hi,
Can you try above query suggested by
/jcr:root/content/we-retail/us/en/products//element(*, cq:Page)
[
(jcr:like(jcr:content/@jcr:title, '%Portland®%'))
]
For Java you can either use QueryBuilderAPI or SQL2 queries.
9 JCR-SQL2 Queries Every AEM Developer Should Know - Blog - 6D Global
https://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html
http://drfits.com/jcr-sql2-query-with-examples/
Thanks
Arun
sai_kumart66079
sai_kumart66079
06-08-2018
Hi Arun Patidar
I tried your method, still i'm not getting expected results..
Below without (®)?
With (®)?
Can you provide reference for JAVA API Search.
Thanks,
Sai.
Techaspect_Solu
Techaspect_Solu
06-08-2018
Hi,
We could achieve your requirement by using the below query. We'd suggest you to give it a try and check if it works.
For trying the below query, go to "/content/we-retail/ca/en/men" and change jcr:title property in title component to "Featured products ®". Then hit the following query from http://localhost:4502/libs/cq/search/content/querydebug.html
path=/content/we-retail/ca/en/men
property=jcr:title
property.operation=like
property.value=%®%
p.limit=-1
You should see the result now.
Hope this helps!
Regards,
Arun_Patidar
MVP
Arun_Patidar
MVP
06-08-2018
Hi Sai,
I gave try for XPATH query again,
works for me.
1. Result with query which you were trying; gives result for both demoText® and demoText
2. Result with below query gives only result which contains at least one ®
If you are not able to get the desire results you can try JAVA API for Search.
Thanks
Arun
sai_kumart66079
sai_kumart66079
06-08-2018
Tried with Arun's solution... But that didn't work.Arun Patidar
Veena_Vikram
MVP
Veena_Vikram
MVP
06-08-2018
Ohk. Will check on this and tell you . Did you try Arun's solution ?
sai_kumart66079
sai_kumart66079
06-08-2018
No that didn't work.... still my results are KalmKap.
smacdonald2008
smacdonald2008
03-08-2018
Nice suggestion veena!
Veena_Vikram
MVP
Veena_Vikram
MVP
03-08-2018
I think you should save the text using hex code for ® symbol. It will be ® .