What indexes are used by TagManager.find() method?
I have a requirement where AEM List component should return results based on Tag query with multiple tags using "any tag" search mode. It works just fine with 1-2 tags, but with eh tags amount increase (5-6 is normal in our circumstances) it sometimes take several minutes to return results.
Our content is fully covered by indexes, including tags properties. Logs do not show any traversal queries so I'm wondering what might be the issue.
JCR query troubleshooting document mentions that for "Queries With Many OR or UNION Conditions", which should be the case here, are very expensive and their recommendation is to use aggregated indexes instead of simple property based.
I assume that under the hood com.day.cq.wcm.foundation.List class is using TagManager.find(String basePath, String[] tagIDs, boolean oneMatchIsEnough) method, so I'm wondering what is the query format in use by that method and how we can improve performance for queries explained above?