cancel
Showing results for 
Search instead for 
Did you mean: 

Getting document properties using nuxeo client

SMAH_Haider
Star Contributor
Star Contributor

In nuxeo 5.4.2 I was able to get document properties like dc:description by this query:

Documents docs = (Documents) session.newRequest("Document.Query").set(
           "query", "SELECT * FROM Document").execute();

I updated the nuxeo version to 5.5 and thus I had to update nuxeo-client version as well to 5.6 but now when I execute the following statement,

Documents docs = (Documents) session.newRequest("Document.Query").set(
           "query", "SELECT * FROM Document").execute();

I could get dc:title and dc:modified but not other properties like dc:description and dc:language etc.

I studied the nuxeo 5.5 documentation and it says, "the documents in the list are containing only the required top level properties."

So how can I get get the other document properties via nuxeo client in nuxeo version 5.5?

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

Try adding

.setHeader(Constants.HEADER_NX_SCHEMAS, "*").

before the .execute(), to request more than the default prefetched properties.

View answer in original post

2 REPLIES 2

Florent_Guillau
World-Class Innovator
World-Class Innovator

Try adding

.setHeader(Constants.HEADER_NX_SCHEMAS, "*").

before the .execute(), to request more than the default prefetched properties.

Perfect. Thanks Florent; now I am able to get all other fields like nature, coverage, description etc.