Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
Level 1
Level 2
Melden Sie sich an, um alle Badges zu sehen
Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.
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........
Gelöst! Gehe zu Lösung.
Zugriffe
Antworten
Likes gesamt
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®%
Zugriffe
Antworten
Likes gesamt
Hi @arunpatidar ,
We're using jcr SQL2 and below mentioned is my query :
SELECT * FROM [cq:PageContent] AS s WHERE ISDESCENDANTNODE([/content/somepath]) AND (CONTAINS(s.[subtitle],"*home-page*") OR CONTAINS(s.[jcr:title],"*home-page*") OR CONTAINS(s.[jcr:description],"*home-page*"))
On search of text ("home-page") containing a special character, I get zero results. However, I do have 'home-page' in content nodes as per given conditions.
Could you please help me to correct my query to get results for text having a special character?
Zugriffe
Antworten
Likes gesamt
Zugriffe
Antworten
Likes gesamt
Hi @arunpatidar,
Thanks for your response.
I'm not sure how did my shared query work for you. Also, I did try your query, still no results. I'm unable to search any keyword with a special character in between like i-phone, e-niro, e-commerce, mobile-phones whereas all these texts exist in my aem content node in jcr:title/jcr:description which should satisfy conditions in my query and show results on search.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Antworten
Likes gesamt
I think you should save the text using hex code for ® symbol. It will be ® .
Zugriffe
Antworten
Likes gesamt
Nice suggestion veena!
Zugriffe
Antworten
Likes gesamt
No that didn't work.... still my results are KalmKap.
Zugriffe
Antworten
Likes gesamt
Ohk. Will check on this and tell you . Did you try Arun's solution ?
Zugriffe
Antworten
Likes gesamt
Tried with Arun's solution... But that didn't work.Arun Patidar
Zugriffe
Antworten
Likes gesamt
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
Zugriffe
Antworten
Likes gesamt
@arunpatidar Is there any way for when we search for demoText® Search we get only pages which have demoText® and not demoText.
As right now it shows for both demoText® and demoText.
I need to get the pages with only demoText® when i searched for demoText®.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Antworten
Likes gesamt
For us ,we will have full text content search not a property search.
One Page has 97 and one page has 97%.
I want to restrict Page with "97" to be shown in the search results when i search with fulltext=97%.
I just want the search results which have 97% in the page not 97.
Can this be done with Fulltext search
Zugriffe
Antworten
Likes gesamt
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,
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
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
Zugriffe
Antworten
Likes gesamt
Thanks Techaspect Solutions, Arun Patidar...
Using like operator it is working as expected.
Thanks,
Sai.
Zugriffe
Antworten
Likes gesamt
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.
Zugriffe
Antworten
Likes gesamt
Zugriffe
Antworten
Likes gesamt
Zugriffe
Likes
Antworten