CMIS Document Query Omits version 0.0 Documents

When I make the following CMIS query:

SELECT * FROM cmis:document order by cmis:name

it doesn't return any of my newly uploaded documents. I found that if I force CMIS to “search all versions” that my documents will be returned.

I found that once a document is versioned past version 0.0, it will be returned in the standard search.

Why does it have this behavior?

I want to search and find only the most current versions of all documents. Adding “search all documents” in order to return version 0.0 documents will return document versions that I'm not interested in.

How can I find “most current version” where version 0.0 is considered a 'version'?

The following doesn't work:

SELECT * FROM cmis:document where (cmis:isLatestVersion=true or cmis:versionLabel is null) order by cmis:name
0 votes

1 answers



What Nuxeo version are you using?

I'm using 5.9.5

I see the same behavior on For example, the document "Readme from Finance" isn't returned in the standard query.

I think the problem is happening because on upload a new document is marked as version 0.0 and then left in a checked-out/PWC state. There is no true 'versioned' document at that point, and that is why the CMIS query fails to find it. Why does the document need to be checked out after upload? – I think most use case scenarios would not expect this behavior.

0.0 is not a version, as was mentioned in a comment above it's the private working copy (PWC) and can be seen as a “draft”.

See NXP-10701 on how to enable automatic versioning of a file after it's been added.

0 votes

Great. That's useful. Is there also a setting so that changing metadata overwrites the metadata of the current version and does not initiate a checkout?

Should I enter this as a bug? I think that the document should be returned from the CMIS query even if only the PWC exists.

Versions are immutable in Nuxeo, so you cannot change metadata on them once they have been created.