Solution :
Query Builder API to Xpath Query conversion
- Go to this path : http://localhost:4502/libs/cq/search/content/querydebug.html
- This tool is used to perform search queries on JCR
- For Example - Search all assets under /content/dam folder
- Use the below query : type= dam:Asset
- Go to this path : /crx/explorer/ui/search.jsp?Path=&Query=%2fjcr%3aroot%2fcontent%2f%2f*
- Enter Search for = men & Search in = /content and choose the option in which query to be searched SQL or XPath
- choose option SQL it equivlent SQL query will be generated : select * from nt:base where jcr:path like '/content/%' and contains(*, 'men') order by jcr:score desc
- Or choose option SQL it equivalent SQL query will be generated : /jcr:root/content//*[jcr:contains(., 'men')] order by @jcr:score descending
- Enter for search in and search for auto query will be generated in the SQL or Xpath based on the selection. That's it!.
Advantages:
1. Help to quickly search full-text or component ,page...etc details in the repository for specific path and search specifiv version of files.
No comments:
Post a Comment