jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torgeir Veimo <torgeir.ve...@gmail.com>
Subject oak index configuration
Date Tue, 10 Feb 2015 10:08:46 GMT
I am struggling with messages such as

20:04:13,598 WARN  query.Cursors$TraversingCursor.fetchNext() - line
312 [0:0:0:0:0:0:0:1] - Traversed 7000 nodes with filter
Filter(query=select c.[jcr:path] as [jcr:path], c.[jcr:score] as
[jcr:score], c.* from [nt:base] as a inner join [nt:base] as b on
isdescendantnode(b, a) inner join [ka:asset] as c on ischildnode(c, b)
where name(a) = 'content' and isdescendantnode(a, '/') and
c.[ka:assetType] = 'company' order by c.[jcr:score] /* xpath:
/jcr:root//content//* /element(*,ka:asset)[@ka:assetType = 'company' ]
order by @jcr:score */, path=//*); consider creating an index or
changing the query

/jcr:root//content//*/element(*,ka:asset)[@ka:assetType = 'company' ]
order by @jcr:score

My indexes are set up with

        NodeBuilder index = IndexUtils.getOrCreateOakIndex(builder);
"oak:QueryIndexDefinition", Type.NAME)
                .setProperty("type", "lucene")
                .setProperty("async", "async")


ImmutableSet.of("jcr:createdBy", "jcr:lastModifiedBy"), Type.STRINGS))
                .setProperty("reindex", true);

        createDefinition("jcr:path", index);
        createDefinition("ka:assetType", index);
        createDefinition("ka:state", index);
        createDefinition("ka:tags", index);
        createDefinition("ka:id", index);
        createDefinition("ka:principal", index);
        createDefinition("ka:owner", index);
        createDefinition("ka:expire", index);
        createDefinition("title", index);

    private void createDefinition(String definition, NodeBuilder index) {
        IndexUtils.createIndexDefinition(index, definition, true, false,

org.elasticsearch.common.collect.ImmutableList.of(definition), null)
                .setProperty("reindex-async", true)
                .setProperty("reindex", true);

Am wondering, is the query syntax somewhat wrong? Am not sure if the
//*/ in the path is correct?


View raw message