Using regex in SQL2 | Community
Skip to main content
New Participant
October 16, 2015
Solved

Using regex in SQL2

  • October 16, 2015
  • 11 replies
  • 6703 views

Hi,

Is there a way I can use regex or something similar to narrow down the number of nodes across which a query will search to find the results.

I am currently using like this:

SELECT * FROM [dam:Asset] AS s WHERE ISDESCENDANTNODE(s,'/content/dam/a') and [jcr:content/metadata/sku]='XYZ'

However I know my actual nodes are 3 levels deeper than /content/dam/a like /content/dam/a/b/c/product, /content/dam/a/d/e/product etc.

So I would like to do something like this:

SELECT * FROM [dam:Asset] AS s WHERE ISDESCENDANTNODE(s,'/content/dam/a/*/product') and [jcr:content/metadata/sku]='XYZ'

Let me know if this is possible without using multiple paths in the where condition. This will also improve the performance of my query as it will restrict the query to fewer folders.

Thanks,Souradeep

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by gopalKa

Please read through http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html#Configuring%20the%20indexes .Find a unique property through which you can identify your nodes and index it.

11 replies

Employee
October 16, 2015

By default indexing is transactional unless you add async property. So it will happen as soon as you update a node.