Existing index is not returning results with Modeshape 4.5.0, 4.6.2
javagirlie Mar 31, 2017 4:42 AMHello modeshape team,
while trying to upgrade our system from modeshape 4.3.0 to 4.6.2 (still using LocalIndexProvider) we have been experiencing troubles with some of our existing indexes.
The indexes worked well with the previous version (and still works fine with 4.4.0) but are not returning any or only a very limited number of results with 4.5.0 and following versions.
So far, we have managed to fix one of the indexes which was previously defined this way:
"primaryTypes" : {
"kind" : "value",
"provider" : "local",
"synchronous" : true,
"nodeType" : "nt:base",
"columns" : "jcr:primaryType(NAME)"
}
The solution was to change it to the following:
"primaryTypes" : {
"kind" : "nodetype",
"provider" : "local",
"synchronous" : true,
"nodeType" : "nt:base",
"columns" : "jcr:primaryType(STRING)"
}
But there remains a problem with another index, which imho has nothing special to it:
"folder" : {
"kind" : "value",
"provider" : "local",
"synchronous" : true,
"nodeType" : "my:medium",
"columns" : "folder(LONG)"
}
Here is an excerpt of our node type definitions with some of our own mixins that (hopefully) should not have an impact:
[my:content] > my:baseContent abstract
+ * (nt:base) COPY
- * (UNDEFINED) multiple COPY
- * (UNDEFINED) COPY
[my:medium] > my:authored, my:content, my:versionable abstract
[my:binaryMedium] > my:medium
[my:document] > my:binaryMedium
Originally, we did not have the 'folder' property on our medium node type. But it seems that it doesn't change anything adding it this way:
[my:medium] > my:authored, my:content, my:versionable abstract
- folder (LONG) mandatory COPY
The query still returns hardly any results when the index is considered:
select [jcr:uuid] from [my:medium] where folder = 20
For example: The query returns just one result. Changing the type in the from part to [my:content] (or unregistering the index), so that the index is not considered, leads to a result of 55 entries.
What we have found out is that the index still works with modeshape 4.4.0 but fails with 4.5.0 and upper versions.
We have already tried to reindex the whole workspace as well as rebuilding the index from scratch (by removing the index before repository startup), unfortunately without success.
Do you have any idea what the problem could be or which change in the modeshape versions could cause this problem? We have been debugging the modeshape code but without any success yet.
Thanks in advance,
Susanne