As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi, I am using the REST API to search a Nuxeo LTS2019 document base. This request: https://ged.imt.fr/nuxeo/site/api/v1/search/lang/NXQL/execute?pageSize=1000&PageIndex=1&sortBy=dc:lastModified&sortOrder=DESC&query=SELECT+*+from+Document+WHERE+ecm:primaryType=%27MAC_DOCUMENT_ADMINISTRATIF%27+AND+ecm:isProxy=0+AND+ecm:isVersion=0+AND+ecm:isTrashed=0 returns: {"entity-type":"documents", "isPaginable":true, "resultsCount":9583, "pageSize":1000, "maxPageSize":1000, "resultsCountLimit":10000, "currentPageSize":56, "currentPageIndex":0, "currentPageOffset":0, "numberOfPages":10, "isPreviousPageAvailable":false, "isNextPageAvailable":true, "isLastPageAvailable":false, "isSortable":true, "hasError":false,"errorMessage":null, "totalSize":9583, "pageIndex":0, "pageCount":10, "entries": ( a JSON array of 56 documents )
The problem is:
What am I doing wrong ?
The query is not the same on the webui nxql search as the API search. On the WebUI your query includes this clause: ecm:mixinType != 'HiddenInNavigation' but the API call does not. Perhaps this would explain the difference in results.
Are you running the api query as the same user (ie, same permissions) as the nxql query?
To fix the sorting, try