How Zerodha's search functions so fast?

I just started developing web apps and I really love Kite Web app. How do Zerodha's search works so fast? Is it by using the data from the javascript file? What framework are you using for js rendering?
  • tonystark
    The search algorithm is powered by many heuristics. It is using instruments dump internally. Kite 2 is using Angular and Kite 3 is using Vue.js as front-end framework.
  • amitkukadia94
    Searching for Stocks is fine.
    I am trying to implement a search for F&O and cant get my head around it. The complete name is just one string.
    It would be really helpful if you can give me a direction to implement it in my backend.
  • sujith
    Since we have around 100k instruments, a plain search should do the job but if you really want to optimize it you need to start by breaking the symbol into exchanges, segments, etc and search those subsets.
  • amitkukadia94
    thanks, Sujit.
    the main challenge was searching F&O contracts. For that, I made a name for them in the name column which contains its script, expiry, type of contract(ce pe fut) and strike price with spaces between them. Then I added a fulltext index to them.
    Works like a charm now.
Sign In or Register to comment.