Currently to search a reference field a dropdown is available in the custom query pop-up UI, but there is a problem with the dropdown, especially when reference data set is huge (more than 50K records). In such cases performance is getting impacted very badly. We also need to increase config values for CONTENTS__MAXRESULTS, CONTENTS__DEFAULTPAGESIZE, UI__REFERENCESDROPDOWNITEMCOUNT to populate all the data in the dropdown, not a desired way.
As a suggestion we can use list view instead of using dropdown in the custom query UI. In the list view, it’s easy to search a record without loading all the data.
One option would be to maintain a special collection with only the reference fields for faster table scan and queries but when you change the reference fields it becomes complicated…
Sorry for replying so late. May be the proposed can help in searching content fast, but the problem with loading large number of records in the dropdown will remain same.
In our use case there are two schemas A and B, A has 40000 records and B has 50000 records. There are more than 35000 distinct records of schema A have been referred in the contents of schema B.
So imagine if user open search UI to filter contents of schema B, CMS will load 50000 records in the dropdown (we need to change the config to load more than 100 records). So loading 50000 records in the dropdown will kill the UI, also experience for in memory search is not good (UI gets freezed).
As a solution for such cases we can give users two levels of search, first user can search records for which they want to apply filter (using list view). Then they can filter the content based on the earlier selected referenced record.
We have implemented a similar solution as proposed above. Have a look at the below screenshots and plase share your feedback for the same. We can raise the pull request in the github repo as well
Hi Sebastian, the change I am referring here related to the custom query UI, there we do not have the flexibility to choose the UI control (dropdown or reference editor).
That’s the reason we are proposing to change the dropdown with the modified version of “reference editor” in the custom query UI for the reference field.