The deprecated searchDocuments and countDocuments methods are using 'distinct' and so we must not forget to add the 'unique' filter (if needed) when using the query manager script service to replace them.