How to create a search engine?

How to create a search engine?
I found some code examples but the search does not work
In javascript I added to the input onkeypress and call a function that connects to the server and pull data
Because I’m new working with ionic and angular I do not want to destroy their way of working.

I’m not sure how this will work for a large scale application, but Angular has a built in filter that can act as a search.

Also see these topics: