Very slow nxql query with some filters

Hello,

I have a nuxeo with mongoDB which contains a lot of data.

My problem is that the following nxql query is very slow: select * from Document where ecm:isTrashed = 0

By removing the filter on ecm:isTrashed, I will have an immediate response, That's why I thought about adding an index for ecm: isTrashed in mongodb but the problem still persists.

For your information, while consulting my documents with mongoDB compass, I noticed that ecm: isTrashed does not appear in the json of my documents and it will be added only for the documents which are in the trash, maybe it is therefore, creating an index does not solve the problem.

Do you have an idea please

0 votes

0 answers

178 views

ANSWER

What about the Elasticsearch indexes and nodes?
02/01/2021

The Elasticsearch indexes and nodes are properly configured and initialized.

Also, elasticsearch queries are very fast but I have the problem only with NXQL.

02/02/2021

NXQL page provider is using the DB implementation: maybe you can try to update the page provider config so that it uses ES? Just an idea
02/02/2021

Are you saying I need to add "nxql_search" to the "elasticsearch.override.pageproviders" property in nuxeo.conf ?

If so, does this action not have an impact on a production platform in use?

02/02/2021