Fix for ALF-10231: SOLR: CMIS infolder and inTree fail as the noderef can not be turned into a PATH ....

- added ANCESTOR tracking to SOLR (as there is no wya to turn a node ref into a PATH)
- tested using the open cmis workbench using IN_FOLDER and in_TREE

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30557 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrew Hind
2011-09-15 18:38:20 +00:00
parent 2fdaab8c35
commit 446dd424ee
3 changed files with 18 additions and 7 deletions

View File

@@ -3343,8 +3343,11 @@ public class QueryTest extends BaseCMISTest
new String(), false, CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
testQuery("SELECT D.*, O.* FROM CMIS:DOCUMENT AS D JOIN CM:OWNABLE AS O ON D.cmis:objectId = O.cmis:objectId WHERE IN_TREE('" + id + "')", 1, false, "cmis:objectId",
new String(), true, CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
testQuery("SELECT D.*, O.* FROM CMIS:DOCUMENT AS D JOIN CM:OWNABLE AS O ON D.cmis:objectId = O.cmis:objectId WHERE IN_TREE('" + id + ";versionLabel" +"')", 0, false, "cmis:objectId",
new String(), true, CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
testQuery("SELECT * FROM cmis:folder WHERE IN_TREE('woof://woof/woof')", 6, false, "cmis:objectId", new String(), true);
testQuery("SELECT * FROM cmis:folder WHERE IN_TREE('woof://woof/woof')", 0, false, "cmis:objectId", new String(), true);
testQuery("SELECT * FROM cmis:folder WHERE IN_TREE('woof://woof/woof;woof')", 0, false, "cmis:objectId", new String(), true);
}
public void test_IN_FOLDER() throws Exception
@@ -3360,11 +3363,12 @@ public class QueryTest extends BaseCMISTest
new String(), false, CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
testQuery("SELECT D.*, O.* FROM CMIS:DOCUMENT AS D JOIN CM:OWNABLE AS O ON D.cmis:objectId = O.cmis:objectId WHERE IN_FOLDER('" + id + "')", 1, false, "cmis:objectId",
new String(), true, CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
testQuery("SELECT D.*, O.* FROM CMIS:DOCUMENT AS D JOIN CM:OWNABLE AS O ON D.cmis:objectId = O.cmis:objectId WHERE IN_FOLDER('" + id + ";versionLabel"+"')", 0, false, "cmis:objectId",
new String(), true, CMISQueryMode.CMS_WITH_ALFRESCO_EXTENSIONS);
// TODO: Id + label is indistinguishable from label and so is never hit in the coes at the moment
// testQuery("SELECT * FROM cmis:folder WHERE IN_FOLDER('woof://woof/woof;woof')", 2, false, "cmis:objectId",
// new String(), false);
testQuery("SELECT * FROM cmis:folder WHERE IN_FOLDER('woof://woof/woof')", 2, false, "cmis:objectId", new String(), true);
// Note folders are unversioned - using a versoin lablel should find nothing
testQuery("SELECT * FROM cmis:folder WHERE IN_FOLDER('woof://woof/woof')", 0, false, "cmis:objectId", new String(), false);
testQuery("SELECT * FROM cmis:folder WHERE IN_FOLDER('woof://woof/woof;woof')", 0, false, "cmis:objectId", new String(), false);
}
public void testFTS() throws Exception