You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2022/03/28 12:22:38 UTC
[sling-org-apache-sling-app-cms] 02/04: SLING-11223 - Fixes and improvements to queries, property usage and indexes to support larger repositories
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit fd7e0d4cc717703339c31525080c190206a31608
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Mon Mar 28 08:17:47 2022 -0400
SLING-11223 - Fixes and improvements to queries, property usage and indexes to support larger repositories
---
.../DefaultScriptBindingsValueProvider.java | 7 +-
.../core/internal/models/ReferenceOperation.java | 4 +-
.../sling/cms/core/models/QueryDebugger.java | 2 +-
.../apache/sling/cms/core/models/StartContent.java | 53 +++++----
.../DefaultScriptBindingsValueProviderTest.java | 5 -
core/src/test/resources/conf.json | 2 +-
.../apache/sling/cms/reference/models/Search.java | 4 +-
.../components/general/searchform/config.json | 55 ++++++----
.../components/general/searchform/searchform.jsp | 3 +-
.../components/general/sitemap/sitemap.xml.jsp | 2 +-
.../reference/components/general/tags/tags.jsp | 2 +-
.../apps/reference/components/pages/base/body.jsp | 5 +-
.../resources/SLING-INF/nodetypes/nodetypes.cnd | 2 +-
ui/src/main/resources/jcr_root/conf/global.json | 2 +-
.../components/cms/contentgrid/contentgrid.jsp | 21 +++-
.../components/cms/contenttable/contenttable.jsp | 21 +++-
.../resources/jcr_root/oak%3Aindex/ntBase.json | 45 ++++++++
.../jcr_root/oak%3Aindex/ntBaseLucene.json | 40 -------
.../jcr_root/oak%3Aindex/ntHierarchyNode.json | 64 +++++++++++
.../resources/jcr_root/oak%3Aindex/published.json | 9 --
.../jcr_root/oak%3Aindex/slingComponent.json | 29 +++++
.../resources/jcr_root/oak%3Aindex/slingFile.json | 87 +++++++++++++++
.../jcr_root/oak%3Aindex/slingFileLucene.json | 76 -------------
.../resources/jcr_root/oak%3Aindex/slingPage.json | 121 +++++++++++++++++++++
.../jcr_root/oak%3Aindex/slingPageLucene.json | 89 ---------------
.../oak%3Aindex/slingResourceSuperType.json | 12 +-
.../jcr_root/oak%3Aindex/slingTaxonomy.json | 63 +++++------
.../jcr_root/oak%3Aindex/slingTemplate.json | 9 --
28 files changed, 494 insertions(+), 340 deletions(-)
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProvider.java b/core/src/main/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProvider.java
index 69e9a8b..3c0473b 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProvider.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProvider.java
@@ -38,20 +38,17 @@ public class DefaultScriptBindingsValueProvider implements BindingsValuesProvide
@Override
public void addBindings(Bindings bindings) {
Resource resource = (Resource) bindings.get("resource");
- ServletRequest request = (ServletRequest) bindings.get("request");
+
bindings.put("properties", resource.getValueMap());
Optional.ofNullable(resource.adaptTo(ComponentConfiguration.class)).map(ComponentConfiguration::getProperties)
.ifPresent(p -> bindings.put("componentConfiguration", p));
- Optional.ofNullable(resource.getResourceResolver().resolve(resource.getPath()))
- .map(rt -> rt.adaptTo(org.apache.sling.cms.Component.class))
- .ifPresent(c -> bindings.put("component", c));
-
Resource publishableParent = CMSUtils.findPublishableParent(resource);
if (publishableParent != null && CMSConstants.NT_PAGE.equals(publishableParent.getResourceType())) {
Optional.of(publishableParent.adaptTo(Page.class)).ifPresent(p -> {
bindings.put("page", p);
+ ServletRequest request = (ServletRequest) bindings.get("request");
if (request.getAttribute(PN_CURRENT_PAGE) == null) {
request.setAttribute(PN_CURRENT_PAGE, p);
bindings.put(PN_CURRENT_PAGE, p);
diff --git a/core/src/main/java/org/apache/sling/cms/core/internal/models/ReferenceOperation.java b/core/src/main/java/org/apache/sling/cms/core/internal/models/ReferenceOperation.java
index eb8218c..85db8ff 100644
--- a/core/src/main/java/org/apache/sling/cms/core/internal/models/ReferenceOperation.java
+++ b/core/src/main/java/org/apache/sling/cms/core/internal/models/ReferenceOperation.java
@@ -82,8 +82,8 @@ public abstract class ReferenceOperation {
public void init() {
log.debug("Finding references to {}", resource.getPath());
- String query = "SELECT * FROM [nt:base] AS s WHERE NOT ISDESCENDANTNODE([/jcr:system/jcr:versionStorage]) AND CONTAINS(s.*, '"
- + Text.escapeIllegalXpathSearchChars(resource.getPath()) + "')";
+ String query = "SELECT * FROM [nt:base] AS s WHERE NOT ISDESCENDANTNODE([/jcr:system]) AND CONTAINS(s.*, '\""
+ + Text.escapeIllegalXpathSearchChars(resource.getPath()) + "\"')";
Set<String> paths = new HashSet<>();
Iterator<Resource> resources = resource.getResourceResolver().findResources(query, Query.JCR_SQL2);
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/QueryDebugger.java b/core/src/main/java/org/apache/sling/cms/core/models/QueryDebugger.java
index 0a690a2..6565d51 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/QueryDebugger.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/QueryDebugger.java
@@ -87,7 +87,7 @@ public class QueryDebugger {
QueryManager queryManager = request.getResourceResolver().adaptTo(Session.class).getWorkspace()
.getQueryManager();
- Query explainQuery = queryManager.createQuery("explain " + statementParam.get(), language);
+ Query explainQuery = queryManager.createQuery("explain measure " + statementParam.get(), language);
Row row = explainQuery.execute().getRows().nextRow();
lplan = row.getValue("plan").getString();
lstatement = statementParam.get();
diff --git a/core/src/main/java/org/apache/sling/cms/core/models/StartContent.java b/core/src/main/java/org/apache/sling/cms/core/models/StartContent.java
index 073e826..ea5a1b8 100644
--- a/core/src/main/java/org/apache/sling/cms/core/models/StartContent.java
+++ b/core/src/main/java/org/apache/sling/cms/core/models/StartContent.java
@@ -66,49 +66,48 @@ public class StartContent {
}
public List<Resource> getRelatedContent() {
- return Stream.concat(get10Related(resolver, CMSConstants.NT_PAGE, term),
- get10Related(resolver, CMSConstants.NT_FILE, term)).sorted((o1, o2) -> {
- try {
- return (int) ((o1.getScore() - o2.getScore()) * 100);
- } catch (RepositoryException e) {
- log.warn("Exception getting score", e);
- return 0;
- }
- }).limit(9).map(row -> {
- try {
- return resolver.getResource(row.getPath());
- } catch (RepositoryException e) {
- log.warn("Failed to get resource", e);
- return null;
- }
- }).filter(Objects::nonNull).collect(Collectors.toList());
+ return get10Related(resolver, term).sorted((o1, o2) -> {
+ try {
+ return (int) ((o1.getScore() - o2.getScore()) * 100);
+ } catch (RepositoryException e) {
+ log.warn("Exception getting score", e);
+ return 0;
+ }
+ }).limit(9).map(row -> {
+ try {
+ return resolver.getResource(row.getPath());
+ } catch (RepositoryException e) {
+ log.warn("Failed to get resource", e);
+ return null;
+ }
+ }).filter(Objects::nonNull).collect(Collectors.toList());
}
public List<Resource> getRecentContent() {
- return Stream.concat(get10Recent(resolver, CMSConstants.NT_PAGE), get10Recent(resolver, CMSConstants.NT_FILE))
- .sorted((o1,
- o2) -> o1.getValueMap().get("jcr:content/jcr:lastModified", new Date())
- .compareTo(o2.getValueMap().get("jcr:content/jcr:lastModified", new Date())) * -1)
+ return get10Recent(resolver).sorted((o1, o2) -> o1.getValueMap().get("jcr:content/jcr:lastModified", new Date())
+ .compareTo(o2.getValueMap().get("jcr:content/jcr:lastModified", new Date())) * -1)
.limit(10).collect(Collectors.toList());
}
- private Stream<Resource> get10Recent(ResourceResolver resolver, String type) {
+ private Stream<Resource> get10Recent(ResourceResolver resolver) {
Iterator<Resource> it = resolver.findResources(
- "SELECT * FROM [" + type + "] WHERE [jcr:content/jcr:lastModifiedBy] = '" + resolver.getUserID()
- + "' AND ISDESCENDANTNODE([/content]) ORDER BY [jcr:content/jcr:lastModified] DESC",
+ "SELECT * FROM [nt:hierarchyNode] WHERE [jcr:content/jcr:lastModifiedBy] = '" + resolver.getUserID()
+ + "' AND ISDESCENDANTNODE([/content]) ORDER BY [jcr:content/jcr:lastModified] DESC /* slingQueryLimit=10 */",
Query.JCR_SQL2);
return StreamSupport.stream(Spliterators.spliteratorUnknownSize(it, Spliterator.NONNULL), false).limit(10);
}
- private Stream<Row> get10Related(ResourceResolver resolver, String type, String term) {
+ private Stream<Row> get10Related(ResourceResolver resolver, String term) {
Session session = resolver.adaptTo(Session.class);
if (session != null) {
try {
Query query = session.getWorkspace().getQueryManager()
- .createQuery("SELECT * FROM [" + type
- + "] AS s WHERE ISDESCENDANTNODE([/content]) AND CONTAINS(s.*,'"
- + term.replace("'", "''") + "')", Query.JCR_SQL2);
+ .createQuery(
+ "SELECT * FROM [nt:hierarchyNode] AS s WHERE ISDESCENDANTNODE([/content]) AND CONTAINS(s.*,'"
+ + term.replace("'", "''") + "')",
+ Query.JCR_SQL2);
+ query.setLimit(10);
QueryResult result = query.execute();
@SuppressWarnings("unchecked")
Iterable<Row> iterable = () -> {
diff --git a/core/src/test/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProviderTest.java b/core/src/test/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProviderTest.java
index cb32100..f17c3f1 100644
--- a/core/src/test/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProviderTest.java
+++ b/core/src/test/java/org/apache/sling/cms/core/internal/DefaultScriptBindingsValueProviderTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue;
import javax.script.Bindings;
import org.apache.sling.api.resource.ValueMap;
-import org.apache.sling.cms.Component;
import org.apache.sling.cms.Page;
import org.apache.sling.cms.core.helpers.SlingCMSTestHelper;
import org.apache.sling.testing.mock.sling.junit.SlingContext;
@@ -59,8 +58,6 @@ public class DefaultScriptBindingsValueProviderTest {
assertEquals(bindings.get("currentPage"), bindings.get("page"));
assertNotNull(bindings.get("properties"));
assertTrue(bindings.get("properties") instanceof ValueMap);
- assertNotNull(bindings.get("component"));
- assertTrue(bindings.get("component") instanceof Component);
assertNotNull(bindings.get("componentConfiguration"));
assertTrue(bindings.get("componentConfiguration") instanceof ValueMap);
@@ -82,8 +79,6 @@ public class DefaultScriptBindingsValueProviderTest {
assertNull(bindings.get("currentPage"));
assertNotNull(bindings.get("properties"));
assertTrue(bindings.get("properties") instanceof ValueMap);
- assertNotNull(bindings.get("component"));
- assertTrue(bindings.get("component") instanceof Component);
assertNotNull(bindings.get("componentConfiguration"));
assertTrue(bindings.get("componentConfiguration") instanceof ValueMap);
diff --git a/core/src/test/resources/conf.json b/core/src/test/resources/conf.json
index 3283cb6..f545ba2 100644
--- a/core/src/test/resources/conf.json
+++ b/core/src/test/resources/conf.json
@@ -83,7 +83,7 @@
},
"published": {
"jcr:primaryType": "nt:unstructured",
- "name": "jcr:content/published",
+ "name": "jcr:content/sling:published",
"label": "Published",
"sling:resourceType": "sling-cms/components/editor/fields/publication"
},
diff --git a/reference/src/main/java/org/apache/sling/cms/reference/models/Search.java b/reference/src/main/java/org/apache/sling/cms/reference/models/Search.java
index b43e0e5..6fd1bdf 100644
--- a/reference/src/main/java/org/apache/sling/cms/reference/models/Search.java
+++ b/reference/src/main/java/org/apache/sling/cms/reference/models/Search.java
@@ -77,8 +77,8 @@ public class Search {
resolver = searchService.getResourceResolver(request);
- String query = "SELECT * FROM [sling:Page] AS p WHERE ([jcr:content/published]=true OR [jcr:content/sling:published]=true) AND (p.[jcr:content/hideInSitemap] IS NULL OR p.[jcr:content/hideInSitemap] <> true) AND ISDESCENDANTNODE(p, '"
- + basePath + "') AND CONTAINS(p.*, '" + term + "') ORDER BY [jcr:score]";
+ String query = "SELECT * FROM [sling:Page] AS p WHERE [jcr:content/sling:published]=true AND p.[jcr:content/hideInSitemap] <> true AND ISDESCENDANTNODE(p, '"
+ + basePath + "') AND CONTAINS(p.*, '" + term + "')";
log.debug("Searching for pages with {} under {} with query: {}", term, basePath, query);
Iterator<Resource> res = resolver.findResources(query, Query.JCR_SQL2);
while (res.hasNext()) {
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/config.json b/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/config.json
index f223e16..34f145f 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/config.json
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/config.json
@@ -1,25 +1,32 @@
- {
+{
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/general/container",
+ "formClass": {
"jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/general/container",
- "formClass": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "Form Class",
- "name": "formClass",
- "type": "text"
- },
- "buttonClass": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "Button Class",
- "name": "buttonClass",
- "type": "text"
- },
- "inputClass": {
- "jcr:primaryType": "nt:unstructured",
- "sling:resourceType": "sling-cms/components/editor/fields/text",
- "label": "Input Class",
- "name": "inputClass",
- "type": "text"
- }
-}
\ No newline at end of file
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "Form Class",
+ "name": "formClass",
+ "type": "text"
+ },
+ "buttonClass": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "Button Class",
+ "name": "buttonClass",
+ "type": "text"
+ },
+ "inputClass": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/text",
+ "label": "Input Class",
+ "name": "inputClass",
+ "type": "text"
+ },
+ "searchPage": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:resourceType": "sling-cms/components/editor/fields/path",
+ "label": "Search Page",
+ "name": "searchPage",
+ "type": "page"
+ }
+}
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/searchform.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/searchform.jsp
index 0838457..2722d6b 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/searchform.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/searchform/searchform.jsp
@@ -17,9 +17,8 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
-<sling:adaptTo var="pageMgr" adaptable="${resource}" adaptTo="org.apache.sling.cms.PageManager" />
<c:set var="searchConfig" value="${sling:adaptTo(resource,'org.apache.sling.cms.ComponentConfiguration').properties}" scope="request" />
-<form action="${pageMgr.page.path}.html" method="GET" class="${sling:encode(searchConfig.formClass,'HTML_ATTR')}">
+<form action="${searchConfig.searchPage}.html" method="GET" class="${sling:encode(searchConfig.formClass,'HTML_ATTR')}">
<fmt:message key="Search" var="searchMessage" />
<input type="text" name="q" class="${sling:encode(searchConfig.inputClass,'HTML_ATTR')}" placeholder="${sling:encode(searchMessage,'HTML_ATTR')}" />
<input type="submit" class="${searchConfig.buttonClass}" value="${sling:encode(searchMessage,'HTML_ATTR')}" />
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp
index 0f41687..060059c 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/sitemap/sitemap.xml.jsp
@@ -20,7 +20,7 @@
<%@include file="/libs/sling-cms/global.jsp"%>
<c:set var="site" value="${sling:adaptTo(resource,'org.apache.sling.cms.SiteManager').site}" />
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
- <c:set var="query" value="SELECT * FROM [sling:Page] WHERE ISDESCENDANTNODE([${site.path}]) AND ([jcr:content/published]=true OR [jcr:content/sling:published]=true) AND ([jcr:content/hideInSitemap] IS NULL OR [jcr:content/hideInSitemap] <> true)" />
+ <c:set var="query" value="SELECT * FROM [sling:Page] WHERE ISDESCENDANTNODE([${site.path}]) AND [jcr:content/sling:published]=true AND [jcr:content/hideInSitemap] <> true" />
<c:forEach var="pageRsrc" items="${sling:findResources(resourceResolver,query,'JCR-SQL2')}">
<c:set var="page" value="${sling:adaptTo(pageRsrc,'org.apache.sling.cms.PageManager').page}" />
<url>
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
index f667e48..f5081d9 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/general/tags/tags.jsp
@@ -27,7 +27,7 @@
<c:forEach var="tagPath" items="${contentResource.valueMap['sling:taxonomy']}">
<c:set var="tag" value="${sling:getResource(resourceResolver,tagPath)}" />
<${itemTag} class="${config.itemClass}">
- <a href="${config.tagPage}.html${tag.path}.html">
+ <a href="${config.tagPage}.html${tag.path}">
<sling:encode value="${tag.valueMap['jcr:title']}" default="${tag.name}" mode="HTML" />
</a>
</${itemTag}>
diff --git a/reference/src/main/resources/jcr_root/apps/reference/components/pages/base/body.jsp b/reference/src/main/resources/jcr_root/apps/reference/components/pages/base/body.jsp
index 640cf7c..2999798 100644
--- a/reference/src/main/resources/jcr_root/apps/reference/components/pages/base/body.jsp
+++ b/reference/src/main/resources/jcr_root/apps/reference/components/pages/base/body.jsp
@@ -17,6 +17,9 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
+
+ <h1>site=${sling:adaptTo(resource,'org.apache.sling.cms.SiteManager').site}</h1>
+ <c:set var="site" value="${sling:adaptTo(resource,'org.apache.sling.cms.SiteManager').site}" />
<body>
<sling:call script="/libs/sling-cms/components/editor/scripts/init.jsp" />
<div class="title">
@@ -32,7 +35,7 @@
</div>
</div>
<div class="menu">
- <sling:include path="/content/apache/sling-apache-org/index/jcr:content/menu" resourceType="sling-cms/components/general/container" />
+ <sling:include path="${site.path}/index/jcr:content/menu" resourceType="sling-cms/components/general/container" />
<a href="http://apache.org/foundation/contributing.html">
<img border="0" alt="Support the Apache Software Foundation!" src="/static/clientlibs/reference/img/SupportApache-small.png" width="115px">
</a>
diff --git a/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd b/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd
index 43edb8f..bb73ec7 100644
--- a/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd
+++ b/ui/src/main/resources/SLING-INF/nodetypes/nodetypes.cnd
@@ -44,7 +44,7 @@
- * (UNDEFINED) multiple
- * (UNDEFINED)
-[sling:File] > nt:file, mix:publishable
+[sling:File] > nt:file
- * (undefined) copy
+ jcr:content (sling:FileContent) = sling:FileContent copy primary autocreated
diff --git a/ui/src/main/resources/jcr_root/conf/global.json b/ui/src/main/resources/jcr_root/conf/global.json
index a7aef8c..e05bf9c 100644
--- a/ui/src/main/resources/jcr_root/conf/global.json
+++ b/ui/src/main/resources/jcr_root/conf/global.json
@@ -58,7 +58,7 @@
},
"published": {
"jcr:primaryType": "nt:unstructured",
- "name": "jcr:content/published",
+ "name": "jcr:content/sling:published",
"label": "Published",
"sling:resourceType": "sling-cms/components/editor/fields/publication"
},
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
index e5cdcb4..ef94870 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contentgrid/contentgrid.jsp
@@ -16,10 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/ --%>
- <%@include file="/libs/sling-cms/global.jsp"%>
+<%@include file="/libs/sling-cms/global.jsp"%>
+<c:choose>
+ <c:when test="${not empty param.page}">
+ <c:set var="paginationPage" value="${param.page}" />
+ </c:when>
+ <c:otherwise>
+ <c:set var="paginationPage" value="0" />
+ </c:otherwise>
+</c:choose>
+<c:set var="PAGE_SIZE" value="${60}" />
<div class="reload-container scroll-container contentnav" data-path="${resource.path}.grid.html${sling:encode(slingRequest.requestPathInfo.suffix,'HTML_ATTR')}">
<div class="columns is-multiline">
- <c:forEach var="child" items="${sling:listChildren(slingRequest.requestPathInfo.suffixResource)}" varStatus="status">
+ <c:forEach var="child" items="${sling:listChildren(slingRequest.requestPathInfo.suffixResource)}" varStatus="status" begin="${paginationPage * PAGE_SIZE}" end="${(paginationPage * PAGE_SIZE + PAGE_SIZE) - 1}">
<c:set var="showCard" value="${false}" />
<c:forEach var="type" items="${sling:listChildren(sling:getRelativeResource(resource,'types'))}">
<c:if test="${child.valueMap['jcr:primaryType'] == type.name}">
@@ -124,4 +133,12 @@
</c:if>
</c:forEach>
</div>
+ <nav class="pagination" role="navigation" aria-label="pagination">
+ <c:if test="${paginationPage != 0}">
+ <a class="pagination-previous" href="?page=${paginationPage - 1}"><fmt:message key="Previous" /></a>
+ </c:if>
+ <c:if test="${paginationPage * PAGE_SIZE + PAGE_SIZE < fn:length(sling:listChildren(slingRequest.requestPathInfo.suffixResource))}">
+ <a class="pagination-next" href="?page=${paginationPage + 1}"><fmt:message key="Next" /></a>
+ </c:if>
+ </nav>
</div>
diff --git a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
index 19b4b8e..02b1147 100644
--- a/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
+++ b/ui/src/main/resources/jcr_root/libs/sling-cms/components/cms/contenttable/contenttable.jsp
@@ -17,6 +17,15 @@
* under the License.
*/ --%>
<%@include file="/libs/sling-cms/global.jsp"%>
+<c:choose>
+ <c:when test="${not empty param.page}">
+ <c:set var="paginationPage" value="${param.page}" />
+ </c:when>
+ <c:otherwise>
+ <c:set var="paginationPage" value="0" />
+ </c:otherwise>
+</c:choose>
+<c:set var="PAGE_SIZE" value="${60}" />
<div class="reload-container table__wrapper scroll-container contentnav" data-path="${resource.path}.table.html${sling:encode(slingRequest.requestPathInfo.suffix,'HTML_ATTR')}">
<table class="table is-fullwidth is-striped sortable">
<thead>
@@ -34,8 +43,8 @@
</thead>
<tbody>
<c:set var="parentPath" value="${slingRequest.requestPathInfo.suffix}${not empty properties.appendSuffix ? properties.appendSuffix : ''}" />
- <c:set var="count" value="1" />
- <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}" varStatus="status">
+ <c:set var="count" value="${paginationPage * PAGE_SIZE + 1}" />
+ <c:forEach var="child" items="${sling:listChildren(sling:getResource(resourceResolver, parentPath))}" varStatus="status" begin="${paginationPage * PAGE_SIZE}" end="${(paginationPage * PAGE_SIZE + PAGE_SIZE) - 1}">
<c:set var="type" value="${not empty child.valueMap['jcr:primaryType'] ? child.valueMap['jcr:primaryType'] : fn:replace(child.resourceType,'/','-')}" />
<sling:getResource var="typeConfig" base="${resource}" path="types/${type}" />
<c:if test="${typeConfig != null && !fn:contains(child.name,':')}">
@@ -56,4 +65,12 @@
</c:forEach>
</tbody>
</table>
+ <nav class="pagination" role="navigation" aria-label="pagination">
+ <c:if test="${paginationPage != 0}">
+ <a class="pagination-previous" href="?page=${paginationPage - 1}"><fmt:message key="Previous" /></a>
+ </c:if>
+ <c:if test="${paginationPage * PAGE_SIZE + PAGE_SIZE < fn:length(sling:listChildren(slingRequest.requestPathInfo.suffixResource))}">
+ <a class="pagination-next" href="?page=${paginationPage + 1}"><fmt:message key="Next" /></a>
+ </c:if>
+ </nav>
</div>
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/ntBase.json b/ui/src/main/resources/jcr_root/oak%3Aindex/ntBase.json
new file mode 100644
index 0000000..3a50e6a
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/ntBase.json
@@ -0,0 +1,45 @@
+{
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "compatVersion": 2,
+ "type": "lucene",
+ "async": ["async", "nrt"],
+ "evaluatePathRestrictions": false,
+ "excludedPaths": ["/jcr:system"],
+ "indexRules": {
+ "jcr:primaryType": "nt:unstructured",
+ "nt:base": {
+ "jcr:primaryType": "nt:unstructured",
+ "properties": {
+ "jcr:primaryType": "nt:unstructured",
+ "slingTaxonomy": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": false,
+ "propertyIndex": true,
+ "name": "sling:taxonomy",
+ "type": "String"
+ },
+ "slingResourceType": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": false,
+ "propertyIndex": true,
+ "name": "sling:resourceType",
+ "type": "String"
+ },
+ "slingPublished": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": false,
+ "propertyIndex": true,
+ "name": "sling:published",
+ "type": "Boolean"
+ },
+ "slingVanityPath": {
+ "jcr:primaryType": "nt:unstructured",
+ "notNullCheckEnabled": true,
+ "propertyIndex": true,
+ "name": "sling:vanityPath",
+ "type": "String"
+ }
+ }
+ }
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/ntBaseLucene.json b/ui/src/main/resources/jcr_root/oak%3Aindex/ntBaseLucene.json
deleted file mode 100644
index 2a8ba54..0000000
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/ntBaseLucene.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "compatVersion": 2,
- "indexPath": "/oak:index/ntBaseLucene",
- "name": "ntBaseLucene",
- "type": "lucene",
- "async": [
- "async",
- "nrt"
- ],
- "evaluatePathRestrictions": false,
- "excludedPaths": [
- "/jcr:system"
- ],
- "reindex": false,
- "reindexCount": 1,
- "indexRules": {
- "jcr:primaryType": "nt:unstructured",
- "nt:base": {
- "jcr:primaryType": "nt:unstructured",
- "properties": {
- "jcr:primaryType": "nt:unstructured",
- "slingTaxonomy": {
- "jcr:primaryType": "nt:unstructured",
- "ordered": false,
- "propertyIndex": true,
- "name": "sling:taxonomy",
- "type": "String"
- },
- "slingResource": {
- "jcr:primaryType": "nt:unstructured",
- "ordered": false,
- "propertyIndex": true,
- "name": "sling:resource",
- "type": "String"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/ntHierarchyNode.json b/ui/src/main/resources/jcr_root/oak%3Aindex/ntHierarchyNode.json
new file mode 100644
index 0000000..7f85e66
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/ntHierarchyNode.json
@@ -0,0 +1,64 @@
+{
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "compatVersion": 2,
+ "type": "lucene",
+ "async": ["async", "nrt"],
+ "evaluatePathRestrictions": true,
+ "includedPaths": ["/content", "/static"],
+ "queryPaths": ["/content", "/static"],
+ "indexRules": {
+ "jcr:primaryType": "nt:unstructured",
+ "nt:hierarchyNode": {
+ "jcr:primaryType": "nt:unstructured",
+ "properties": {
+ "jcr:primaryType": "nt:unstructured",
+ "jcrLastModified": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": true,
+ "propertyIndex": true,
+ "name": "jcr:content/jcr:lastModified",
+ "type": "Date"
+ },
+ "jcrLastModifiedBy": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/jcr:lastModifiedBy",
+ "type": "String"
+ },
+ "jcrTitle": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "propertyIndex": true,
+ "analyzed": true,
+ "name": "jcr:content/jcr:title",
+ "boost": 2
+ },
+ "nodeName": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "propertyIndex": true,
+ "name": ":nodeName",
+ "type": "String"
+ },
+ "slingTaxonomy": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/sling:taxonomy",
+ "type": "String"
+ },
+ "slingResourceType": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/sling:resourceType",
+ "type": "String"
+ },
+ "slingPublished": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "sling:published",
+ "type": "Boolean"
+ }
+ }
+ }
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/published.json b/ui/src/main/resources/jcr_root/oak%3Aindex/published.json
deleted file mode 100644
index 1c6ef51..0000000
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/published.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "jcr:name:propertyNames": [
- "published"
- ],
- "type": "property",
- "reindex": false,
- "reindexCount": 1
-}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingComponent.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingComponent.json
new file mode 100644
index 0000000..cdc9612
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/slingComponent.json
@@ -0,0 +1,29 @@
+{
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "compatVersion": 2,
+ "type": "lucene",
+ "async": ["async", "nrt"],
+ "includedPaths": ["/apps", "/libs"],
+ "evaluatePathRestrictions": true,
+ "indexRules": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:Component": {
+ "jcr:primaryType": "nt:unstructured",
+ "properties": {
+ "jcr:primaryType": "nt:unstructured",
+ "componentType": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "notNullCheckEnabled": true,
+ "name": "componentType"
+ },
+ "jcrTitle": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": true,
+ "propertyIndex": true,
+ "name": "jcr:title"
+ }
+ }
+ }
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingFile.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingFile.json
new file mode 100644
index 0000000..cc22106
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/slingFile.json
@@ -0,0 +1,87 @@
+{
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "compatVersion": 2,
+ "type": "lucene",
+ "async": ["async", "nrt"],
+ "includedPaths": ["/content", "/static"],
+ "evaluatePathRestrictions": true,
+ "aggregates": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:File": {
+ "jcr:primaryType": "nt:unstructured",
+ "include0": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "jcr:content"
+ },
+ "include1": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "jcr:content/metadata"
+ }
+ }
+ },
+ "indexRules": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:File": {
+ "jcr:primaryType": "nt:unstructured",
+ "properties": {
+ "jcr:primaryType": "nt:unstructured",
+ "jcrDescription": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:content/jcr:description"
+ },
+ "jcrLastModified": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": true,
+ "propertyIndex": true,
+ "name": "jcr:content/jcr:lastModified",
+ "type": "Date"
+ },
+ "jcrLastModifiedBy": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/jcr:lastModifiedBy",
+ "type": "String"
+ },
+ "jcrTitle": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:content/jcr:title",
+ "boost": 2
+ },
+ "nodeName": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "name": ":nodeName",
+ "type": "String"
+ },
+ "slingPublished": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/sling:published",
+ "type": "Boolean"
+ },
+ "slingTaxonomy": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:content/sling:taxonomy"
+ }
+ }
+ }
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingFileLucene.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingFileLucene.json
deleted file mode 100644
index 92861df..0000000
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/slingFileLucene.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "compatVersion": 2,
- "indexPath": "/oak:index/slingFileLucene",
- "name": "slingFileLucene",
- "type": "lucene",
- "async": [
- "async",
- "nrt"
- ],
- "evaluatePathRestrictions": true,
- "excludedPaths": [
- "/var",
- "/jcr:system"
- ],
- "aggregates": {
- "jcr:primaryType": "nt:unstructured",
- "sling:File": {
- "jcr:primaryType": "nt:unstructured",
- "include0": {
- "jcr:primaryType": "nt:unstructured",
- "path": "jcr:content"
- },
- "include1": {
- "jcr:primaryType": "nt:unstructured",
- "path": "jcr:content/metadata"
- }
- }
- },
- "indexRules": {
- "jcr:primaryType": "nt:unstructured",
- "sling:File": {
- "jcr:primaryType": "nt:unstructured",
- "properties": {
- "jcr:primaryType": "nt:unstructured",
- "slingTaxonomy": {
- "jcr:primaryType": "nt:unstructured",
- "nodeScopeIndex": true,
- "useInSuggest": true,
- "propertyIndex": true,
- "useInSpellcheck": true,
- "analyzed": true,
- "name": "jcr:content/sling:taxonomy"
- },
- "jcrTitle": {
- "jcr:primaryType": "nt:unstructured",
- "nodeScopeIndex": true,
- "useInSuggest": true,
- "propertyIndex": true,
- "useInSpellcheck": true,
- "analyzed": true,
- "name": "jcr:content/jcr:title",
- "boost": 2
- },
- "jcrDescription": {
- "jcr:primaryType": "nt:unstructured",
- "nodeScopeIndex": true,
- "useInSuggest": true,
- "propertyIndex": true,
- "useInSpellcheck": true,
- "analyzed": true,
- "name": "jcr:content/jcr:description"
- },
- "nodeName": {
- "jcr:primaryType": "nt:unstructured",
- "nodeScopeIndex": true,
- "useInSuggest": true,
- "propertyIndex": true,
- "useInSpellcheck": true,
- "name": ":nodeName",
- "type": "String"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingPage.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingPage.json
new file mode 100644
index 0000000..0db9497
--- /dev/null
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/slingPage.json
@@ -0,0 +1,121 @@
+{
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "compatVersion": 2,
+ "type": "lucene",
+ "async": ["async", "nrt"],
+ "evaluatePathRestrictions": true,
+ "includedPaths": ["/content", "/static"],
+ "aggregates": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:Page": {
+ "jcr:primaryType": "nt:unstructured",
+ "include0": {
+ "jcr:primaryType": "nt:unstructured",
+ "relativeNode": true,
+ "path": "jcr:content"
+ }
+ },
+ "nt:file": {
+ "jcr:primaryType": "nt:unstructured",
+ "include0": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "jcr:content"
+ }
+ },
+ "nt:unstructured": {
+ "jcr:primaryType": "nt:unstructured",
+ "include0": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "*"
+ },
+ "include1": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "*/*"
+ },
+ "include2": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "*/*/*"
+ },
+ "include3": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "*/*/*/*"
+ },
+ "include4": {
+ "jcr:primaryType": "nt:unstructured",
+ "path": "*/*/*/*/*"
+ }
+ }
+ },
+ "indexRules": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:Page": {
+ "jcr:primaryType": "nt:unstructured",
+ "properties": {
+ "jcr:primaryType": "nt:unstructured",
+ "jcrDescription": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:content/jcr:description"
+ },
+ "jcrTitle": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:content/jcr:title",
+ "type": "String",
+ "boost": 2
+ },
+ "nodeName": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "name": ":nodeName",
+ "type": "String"
+ },
+ "jcrLastModified": {
+ "jcr:primaryType": "nt:unstructured",
+ "ordered": true,
+ "propertyIndex": true,
+ "name": "jcr:content/jcr:lastModified",
+ "type": "Date"
+ },
+ "jcrLastModifiedBy": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/jcr:lastModifiedBy",
+ "type": "String"
+ },
+ "slingPublished": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/sling:published",
+ "type": "Boolean"
+ },
+ "slingTaxonomy": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:content/sling:taxonomy"
+ },
+ "slingTemplate": {
+ "jcr:primaryType": "nt:unstructured",
+ "propertyIndex": true,
+ "name": "jcr:content/sling:template",
+ "type": "String"
+ }
+ }
+ }
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingPageLucene.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingPageLucene.json
deleted file mode 100644
index 3f5f4d2..0000000
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/slingPageLucene.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "compatVersion": 2,
- "indexPath": "/oak:index/slingPageLucene",
- "name": "slingPageLucene",
- "type": "lucene",
- "async": [
- "async",
- "nrt"
- ],
- "evaluatePathRestrictions": true,
- "excludedPaths": [
- "/var",
- "/jcr:system"
- ],
- "aggregates": {
- "jcr:primaryType": "nt:unstructured",
- "sling:Page": {
- "jcr:primaryType": "nt:unstructured",
- "include0": {
- "jcr:primaryType": "nt:unstructured",
- "relativeNode": true,
- "path": "jcr:content"
- }
- },
- "nt:file": {
- "jcr:primaryType": "nt:unstructured",
- "include0": {
- "jcr:primaryType": "nt:unstructured",
- "path": "jcr:content"
- }
- },
- "nt:unstructured": {
- "jcr:primaryType": "nt:unstructured",
- "include0": {
- "jcr:primaryType": "nt:unstructured",
- "path": "*"
- },
- "include1": {
- "jcr:primaryType": "nt:unstructured",
- "path": "*/*"
- },
- "include2": {
- "jcr:primaryType": "nt:unstructured",
- "path": "*/*/*"
- },
- "include3": {
- "jcr:primaryType": "nt:unstructured",
- "path": "*/*/*/*"
- },
- "include4": {
- "jcr:primaryType": "nt:unstructured",
- "path": "*/*/*/*/*"
- }
- }
- },
- "indexRules": {
- "jcr:primaryType": "nt:unstructured",
- "sling:Page": {
- "jcr:primaryType": "nt:unstructured",
- "properties": {
- "jcr:primaryType": "nt:unstructured",
- "slingLastModified": {
- "jcr:primaryType": "nt:unstructured",
- "ordered": true,
- "propertyIndex": true,
- "name": "jcr:content/sling:lastModified",
- "type": "Date"
- },
- "slingLastModifiedBy": {
- "jcr:primaryType": "nt:unstructured",
- "propertyIndex": true,
- "name": "jcr:content/sling:lastModifiedBy",
- "type": "String"
- },
- "jcrTitle": {
- "jcr:primaryType": "nt:unstructured",
- "nodeScopeIndex": true,
- "useInSuggest": true,
- "propertyIndex": true,
- "useInSpellcheck": true,
- "analyzed": true,
- "name": "jcr:content/jcr:title",
- "type": "String"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingResourceSuperType.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingResourceSuperType.json
index 7e6ae94..8eb9b0f 100644
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/slingResourceSuperType.json
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/slingResourceSuperType.json
@@ -1,9 +1,5 @@
{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "jcr:name:propertyNames": [
- "sling:resourceSuperType"
- ],
- "type": "property",
- "reindex": false,
- "reindexCount": 1
-}
\ No newline at end of file
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "jcr:name:propertyNames": ["sling:resourceSuperType"],
+ "type": "property"
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingTaxonomy.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingTaxonomy.json
index fbae8a3..7147f6b 100644
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/slingTaxonomy.json
+++ b/ui/src/main/resources/jcr_root/oak%3Aindex/slingTaxonomy.json
@@ -1,35 +1,36 @@
{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "compatVersion": 2,
- "indexPath": "/oak:index/slingTaxonomy",
- "name": "slingTaxonomy",
- "type": "lucene",
- "async": [
- "async",
- "nrt"
- ],
- "evaluatePathRestrictions": true,
- "excludedPaths": [
- "/var",
- "/jcr:system"
- ],
- "indexRules": {
+ "jcr:primaryType": "oak:QueryIndexDefinition",
+ "compatVersion": 2,
+ "type": "lucene",
+ "includedPaths": ["/etc/taxonomy"],
+ "async": ["async", "nrt"],
+ "evaluatePathRestrictions": true,
+ "indexRules": {
+ "jcr:primaryType": "nt:unstructured",
+ "sling:Taxonomy": {
+ "jcr:primaryType": "nt:unstructured",
+ "properties": {
"jcr:primaryType": "nt:unstructured",
- "sling:Taxonomy": {
- "jcr:primaryType": "nt:unstructured",
- "properties": {
- "jcr:primaryType": "nt:unstructured",
- "jcrTitle": {
- "jcr:primaryType": "nt:unstructured",
- "nodeScopeIndex": true,
- "useInSuggest": true,
- "propertyIndex": true,
- "useInSpellcheck": true,
- "analyzed": true,
- "name": "jcr:title",
- "type": "String"
- }
- }
+ "jcrTitle": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "analyzed": true,
+ "name": "jcr:title",
+ "type": "String"
+ },
+ "nodeName": {
+ "jcr:primaryType": "nt:unstructured",
+ "nodeScopeIndex": true,
+ "useInSuggest": true,
+ "propertyIndex": true,
+ "useInSpellcheck": true,
+ "name": ":nodeName",
+ "type": "String"
}
+ }
}
-}
\ No newline at end of file
+ }
+}
diff --git a/ui/src/main/resources/jcr_root/oak%3Aindex/slingTemplate.json b/ui/src/main/resources/jcr_root/oak%3Aindex/slingTemplate.json
deleted file mode 100644
index f19b671..0000000
--- a/ui/src/main/resources/jcr_root/oak%3Aindex/slingTemplate.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "jcr:primaryType": "oak:QueryIndexDefinition",
- "jcr:name:propertyNames": [
- "sling:template"
- ],
- "type": "property",
- "reindex": false,
- "reindexCount": 1
-}
\ No newline at end of file