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.
I don’t get it. the references dropdown should only load 100 items or so, it is only meant for small result sets.
Now I get it: The problem is the search itself. Writing a general search system that makes a contains search over all fields is also complicated.
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
But why can you not use a normal reference editor for that?
If there is no quick search, a dropdown would have very little advantages.
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.
Now I get it. It took a while
This makes sense indeed.
Should we raise a pull request for this feature?
If you want: Sure … I would add a parameter to the normal reference editor to have the expected design and then just swap the editor.
Sure Sebastian. I will try to raise the pull request for the same.
Can you do it for the release/design2 branch?
sure, I will use release/design2 as base branch.
I have realized, that it is relatively complicated due to the dependencies. I am working on it.
This topic was automatically closed after 2 days. New replies are no longer allowed.