Server-side searchBar / ListView

I’m looking for a way to display the huge list from the database and search in it.

The number of documents in the underlying MongoDB collection is huge and it’s not worth transferring all of them to the client side (time, traffic) and perform a search locally, so I’m looking how this could be done on the server side.

Specifically, I need to plug MongoDB code to the searchBar and when somebody starts typing in the searchBar, I will dynamically search in MongoDB, supplying 5 top documents back.

Need some guidance regarding where to start from.

1 Like

you can use virtual lists

better is to create a app method to call the data as soon as the user begins to load your app.

data: function () {
  let data = {      
  route_root: '/some/real/path',
  image_root: '/image/path/',
 data.list = undefined;

  return data;
methods: {
setList: function(){
  if ( === undefined){
    var ListP = fetch(my_ajax_url + '?controler=Somedata&action=getAllItemsList&userId='+userId)
        return response.json();     
    }).then(function(json){ = json.return;

something like that.