cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS query gives SOLR 400 error with query

DM8800
Dabbler
Dabbler

hi,

I have this CMIS Query that works in Postman.

 

 

 

SELECT * FROM cmis:folder WHERE CONTAINS('PATH:"//app:company_home/st:sites/cm:SOCIALEDOSSIERS/cm:documentLibrary/*"')

 

 

 

This returns me a nice JSON:

 

 

 

{
            "properties": {
                "cmis:objectId": {
                    "id": "cmis:objectId",
                    "localName": "objectId",
                    "queryName": "cmis:objectId",
                    "type": "id",
                    "cardinality": "single",
                    "value": "47b4d4bf-6f73-4422-a0e7-f635833d93e1"
                },
                "alfcmis:nodeRef": {
                    "id": "alfcmis:nodeRef",
                    "localName": "nodeRef",
                    "queryName": "alfcmis:nodeRef",
                    "type": "id",
                    "cardinality": "single",
                    "value": "workspace://SpacesStore/47b4d4bf-6f73-4422-a0e7-f635833d93e1"
                },
                "cmis:path": {
                    "id": "cmis:path",
                    "localName": "path",
                    "displayName": "Path",
                    "queryName": "cmis:path",
                    "type": "string",
                    "cardinality": "single",
                    "value": "/Sites/SOCIALEDOSSIERS/documentLibrary/2003_41"
                },
                "cmis:allowedChildObjectTypeIds": {
                    "id": "cmis:allowedChildObjectTypeIds",
                    "localName": "allowedChildObjectTypeIds",
                    "displayName": "Allowed Child Object Types Ids",
                    "queryName": "cmis:allowedChildObjectTypeIds",
                    "type": "id",
                    "cardinality": "multi",
                    "value": null
                }
                    ]
                }

 

 

 

When I use the "2003_41"

 

 

SELECT * FROM cmis:folder WHERE CONTAINS('PATH:"//app:company_home/st:sites/cm:SOCIALEDOSSIERS/cm:documentLibrary/cm:2003_41/*"')

 

 

I get 

 

 

{
    "exception": "runtime",
    "message": "00231702 Solr request failed with 400 /solr/alfresco/cmis?wt=json&fl=DBID%2Cscore&rows=10000&df=TEXT&start=0&locale=en_US&alternativeDic=DEFAULT_DICTIONARY&cmisVersion=CMIS_1_1&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON"
}

 

 

I found this link, https://stackoverflow.com/questions/37290779/lucene-search-in-alfresco,  but this does not work either, then the results list is empty. But there should return 2 folders. 

How can I get the contents of this folder?

 

 

1 ACCEPTED ANSWER

DM8800
Dabbler
Dabbler

Got it working with 

SELECT * FROM cmis:document WHERE CONTAINS('PATH:"//app:company_home/st:sites/cm:SITE/cm:documentLibrary/cm:_x0032_003_41/cm:_x0031__Extern/*"')

It took the SOLR indexer some time to index it.

View answer in original post

1 REPLY 1

DM8800
Dabbler
Dabbler

Got it working with 

SELECT * FROM cmis:document WHERE CONTAINS('PATH:"//app:company_home/st:sites/cm:SITE/cm:documentLibrary/cm:_x0032_003_41/cm:_x0031__Extern/*"')

It took the SOLR indexer some time to index it.