Algolia + MVC + ajax call for searching


I’m trying out algolia using and MVC but I can’t find any links on the best practice for implementing this in algolia.

Can you please check if I’m doing it correctly?

global asax

string json = JsonConvert.SerializeObject(userslist);
JArray batch = JArray.Parse(json);
Index index = client.InitIndex(“contacts”);

I have a search bar here and onkeyup should do an ajax call doing the search. I saw an example where you are calling the init method in the javascript. is this necessary? Can you show me a full example of searching particularly the js side of it?

Thanks and hope to hear from you soon