cancel
Showing results for 
Search instead for 
Did you mean: 

How to query index of Document (the "ecm:pos") via Java API?

erdmann_
Champ on-the-rise
Champ on-the-rise

While coreSession.query() works fine for "SELECT * FROM Document WHERE ... order by ecm:pos " i do not find a way to get this ecm:pos value.

Unfortunately, it is not one of the getters of DocumentModel. The simple trial with "SELECT * , ecm:pos FROM" does not throw an error, but always 0 items (at least against SQLRepositoryTestCase)

  • and if it would work, what is the result object's type?, The only docs i found are the NXQL spec and the API (but i'am sure, i missed some)

Thanks,

[And as this is my first post ever: Many thanks for nuxeo! Great job!]

1 ACCEPTED ANSWER

Florent_Guillau
World-Class Innovator
World-Class Innovator

Today the only way to get at the ecm:pos of a document is to do a query using the queryAndFetch API and request the value of ecm:pos:

SELECT ecm:uuid, ecm:pos, ... FROM Document WHERE ...

View answer in original post

3 REPLIES 3

Florent_Guillau
World-Class Innovator
World-Class Innovator

Today the only way to get at the ecm:pos of a document is to do a query using the queryAndFetch API and request the value of ecm:pos:

SELECT ecm:uuid, ecm:pos, ... FROM Document WHERE ...

Thanks, works fine.

Orderable is a property of the folder contain the documents, not of the documents themselves.