Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

CQ5 jcr sql search result return up to 100 rows

Avatar

Level 1

hi,

I am new to this product. I been using this search tool http://localhost:4503/crx/explorer/ui/search.jsp?Path=&Query= to query the content in jcr.

The search result returned up to 100 rows, even though I can see there is more in the result set. For example. it showed like 100 of 197.

Is there any setting somewhere that I can remove this limit?

Also in the search result it has 2 columns. One is name and other is Path. How do I customize the search result like adding more columns?

Thanks in advance.

T.

1 Accepted Solution

Avatar

Correct answer by
Level 10

If you want better control over searching and querying the JCR, then use the JCR API or the Query Builder API.

See this community article for the JCR API within an OSGi bundle:

http://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html

See this community article for the Query Builder API:

http://helpx.adobe.com/experience-manager/using/using-query-builder-api1.html

View solution in original post

5 Replies

Avatar

Level 5

Hi Tan,

Could could try adding &p.limit=-1 to your query. This will remove the limit.

Cheers,

Love Sharma

Avatar

Level 1

Thanks for quick response.

I got  this error "Was expecting one of: <EOF> "ORDER" ... "WHERE" ... "(" ... "," ..." as I run this select * from nt:base Limit=-1

Is this correct syntax?

Thanks again.

Avatar

Level 10

Seems like you are using crx search with SQL & xpath.  AFAIK JSR spec does not specify a way for queries to explicitly state that only a selected subset results should be returned. so this won;t be possible.  Instead Get familiar with querybuilder & querydebug tool at [1]. More documentation details at [2] & infact my favorite bookmarked url.  AT [1] you can use limit ...

[1]  http://localhost:4502/libs/cq/search/content/querydebug.html

[2]   http://dev.day.com/docs/en/cq/current/dam/customizing_and_extendingcq5dam/query_builder.html

Avatar

Correct answer by
Level 10

If you want better control over searching and querying the JCR, then use the JCR API or the Query Builder API.

See this community article for the JCR API within an OSGi bundle:

http://helpx.adobe.com/experience-manager/using/querying-experience-manager-data-using1.html

See this community article for the Query Builder API:

http://helpx.adobe.com/experience-manager/using/using-query-builder-api1.html