0

I facing a huge problem here i have a zf apigility as my backend and a simple dropdown in my front-end, and i want to get all the results of REST in apigility URL and put as autocomplete in my dropdown, but my problem is that i have about 72,000 register in database :/ some advices ?

thanks

1 Answers1

0

Two concepts you need to include in your autocomplete endpoint.

Filtering and Pagination.

First and foremost, I'd decide on a sensible minimum number of characters before returning results. 2? 3? Whatever works for you.

Secondly, don't return EVERY result, return only the first page (page size is up to you, 20? 50? however many is acceptable to you).

Tim Klever
  • 601
  • 5
  • 13
  • Yeah Tim i made it, and its very helpfull, im using params on fecth all to filter the results, its pretty fast now im using where LIKE on php, my problem now its that autocomplete get all the resultSet ( its ok ) but its not filtering when i type, im using external JSON exapl of Jquery UI...some advices ? – Augusto Coelho Henriques Sep 24 '15 at 12:13