Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 140765

Re: Search query not able to find node under a specific site structure (eg. 2013/05)?

$
0
0

Hi Abhishek,

 

In case of nodes with numbers, any node starting with 0, this 0 gets omitted in the search query.

 

So, if your node name is like 02013 for year, when it searches it omits 0 and searches for 2013.

 

In case you want to search for your node, your SQL2 query should be like below:

SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE(['/content/mysite/en/products/2013/05'])

See screenshot for reference. This should return you the results.

 

Hope this helps.

 

I guess for more reference on SQL2 queries, you can refer to JCR 2.0 spec.

http://www.day.com/specs/jcr/2.0/6_Query.html

 

Also, you might want to look at the railroad diagrams and some examples from Jackrabbit's test cases:

http://www.h2database.com/jcr/grammar.html

http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/s rc/test/resources/org/apache/jackrabbit/spi/commons/query/sql2/test.sq l2.txt?view=markup

 

Hope this helps.

SQL2QueryIssue.jpg


Viewing all articles
Browse latest Browse all 140765

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>