[jira] [Commented] (SLING-4951) Make query for validation models more Oak-friendly
[ https://issues.apache.org/jira/browse/SLING-4951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14696992#comment-14696992 ] Justin Edelson commented on SLING-4951: --- My assumption (which is perhaps incorrect) is that any usage of Sling on Oak is going to have *at minimum* an index on the sling:resourceType property. Make query for validation models more Oak-friendly -- Key: SLING-4951 URL: https://issues.apache.org/jira/browse/SLING-4951 Project: Sling Issue Type: Improvement Components: Validation Reporter: Konrad Windszus Assignee: Konrad Windszus Fix For: Validation 1.0.0 Currently the {{ResourceValidationModelProviderImpl}} is looking for appropriate models with the following query: {{/jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type}} This leads to warnings like this in OAK: {code} 14.08.2015 14:07:04.659 *WARN* [0:0:0:0:0:0:0:1 [1439554021017] GET some path HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 8000 nodes with filter Filter(query=select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on isdescendantnode(b, a) where name(a) = 'validation' and isdescendantnode(a, '/apps') and b.[sling:resourceType] = 'sling/validation/model' and b.[validatedResourceType] = 'some resource type' /* xpath: /jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type] */, path=/apps//*); consider creating an index or changing the query {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4951) Make query for validation models more Oak-friendly
[ https://issues.apache.org/jira/browse/SLING-4951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14696995#comment-14696995 ] Konrad Windszus commented on SLING-4951: That is correct but still my 2 points from above stay valid, because {{validatedResourceType}} will not be indexed by default nor the node name. Make query for validation models more Oak-friendly -- Key: SLING-4951 URL: https://issues.apache.org/jira/browse/SLING-4951 Project: Sling Issue Type: Improvement Components: Validation Reporter: Konrad Windszus Assignee: Konrad Windszus Fix For: Validation 1.0.0 Currently the {{ResourceValidationModelProviderImpl}} is looking for appropriate models with the following query: {{/jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type}} This leads to warnings like this in OAK: {code} 14.08.2015 14:07:04.659 *WARN* [0:0:0:0:0:0:0:1 [1439554021017] GET some path HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 8000 nodes with filter Filter(query=select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on isdescendantnode(b, a) where name(a) = 'validation' and isdescendantnode(a, '/apps') and b.[sling:resourceType] = 'sling/validation/model' and b.[validatedResourceType] = 'some resource type' /* xpath: /jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type] */, path=/apps//*); consider creating an index or changing the query {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4951) Make query for validation models more Oak-friendly
[ https://issues.apache.org/jira/browse/SLING-4951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14697010#comment-14697010 ] Justin Edelson commented on SLING-4951: --- I agree that a validatedResourceType index would be helpful. I'm not sure I understand your point about node name. There's no node name in the query above. Make query for validation models more Oak-friendly -- Key: SLING-4951 URL: https://issues.apache.org/jira/browse/SLING-4951 Project: Sling Issue Type: Improvement Components: Validation Reporter: Konrad Windszus Assignee: Konrad Windszus Fix For: Validation 1.0.0 Currently the {{ResourceValidationModelProviderImpl}} is looking for appropriate models with the following query: {{/jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type}} This leads to warnings like this in OAK: {code} 14.08.2015 14:07:04.659 *WARN* [0:0:0:0:0:0:0:1 [1439554021017] GET some path HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 8000 nodes with filter Filter(query=select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on isdescendantnode(b, a) where name(a) = 'validation' and isdescendantnode(a, '/apps') and b.[sling:resourceType] = 'sling/validation/model' and b.[validatedResourceType] = 'some resource type' /* xpath: /jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type] */, path=/apps//*); consider creating an index or changing the query {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4951) Make query for validation models more Oak-friendly
[ https://issues.apache.org/jira/browse/SLING-4951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14697087#comment-14697087 ] Konrad Windszus commented on SLING-4951: You see it in the translation to the SQL2 query that the part {{/jcr:root/apps//validation}} of the XPath query is translated into an inner join. The first part /jcr:root/apps becomes {{isdescendantnode('/apps)}} the second part becomes {{name(a)=validation}}. Make query for validation models more Oak-friendly -- Key: SLING-4951 URL: https://issues.apache.org/jira/browse/SLING-4951 Project: Sling Issue Type: Improvement Components: Validation Reporter: Konrad Windszus Assignee: Konrad Windszus Fix For: Validation 1.0.0 Currently the {{ResourceValidationModelProviderImpl}} is looking for appropriate models with the following query: {{/jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type}} This leads to warnings like this in OAK: {code} 14.08.2015 14:07:04.659 *WARN* [0:0:0:0:0:0:0:1 [1439554021017] GET some path HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 8000 nodes with filter Filter(query=select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on isdescendantnode(b, a) where name(a) = 'validation' and isdescendantnode(a, '/apps') and b.[sling:resourceType] = 'sling/validation/model' and b.[validatedResourceType] = 'some resource type' /* xpath: /jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type] */, path=/apps//*); consider creating an index or changing the query {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4951) Make query for validation models more Oak-friendly
[ https://issues.apache.org/jira/browse/SLING-4951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14696939#comment-14696939 ] Konrad Windszus commented on SLING-4951: The warning is caused by the facts # that Oak (or better Sling with Oak) does not have a property index for {{validatedResourceType}} # that Oak does not yet support a query considering node names: https://issues.apache.org/jira/browse/OAK-1752 Make query for validation models more Oak-friendly -- Key: SLING-4951 URL: https://issues.apache.org/jira/browse/SLING-4951 Project: Sling Issue Type: Improvement Components: Validation Reporter: Konrad Windszus Assignee: Konrad Windszus Fix For: Validation 1.0.0 Currently the {{ResourceValidationModelProviderImpl}} is looking for appropriate models with the following query: {{/jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type}} This leads to warnings like this in OAK: {code} 14.08.2015 14:07:04.659 *WARN* [0:0:0:0:0:0:0:1 [1439554021017] GET some path HTTP/1.1] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 8000 nodes with filter Filter(query=select b.[jcr:path] as [jcr:path], b.[jcr:score] as [jcr:score], b.* from [nt:base] as a inner join [nt:base] as b on isdescendantnode(b, a) where name(a) = 'validation' and isdescendantnode(a, '/apps') and b.[sling:resourceType] = 'sling/validation/model' and b.[validatedResourceType] = 'some resource type' /* xpath: /jcr:root/apps//validation//*[@sling:resourceType=sling/validation/model and @validatedResourceType=some resource type] */, path=/apps//*); consider creating an index or changing the query {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)