Search functionality in App

Hello, I am developing Android app, where I need to implement search functionality. In this Users should be able to search any data that is available to them, whether the content is located on the device or the Internet.
Is there any better way to implement this using Phone Gap or JavaScript or Angular JS?

Thanks in advance.

Definitely, depending on what service you use for your searches.

We have an example on our codepen that searches images from flicker.

Hello mhartinton, Thanks for reply.

Basically, my search should return data from multiple places. For example, Let say I am developing app for products. One customer purchased different Products on different Months. When he searches a product app should display all products on this months and previous months. So…

Here is my approach which I think of after spending some time

Offline Search - Search locally for current month. For this Just use filters
Online Search- Search online user $http to make a service call. Get data from service and display to user.

Do you think is this correct approach?

Also, Adding to my above reply, lets say I found some 1000+ products during my search, It might take more time to load data to user. Is there any way where I can should 50 Products and when user scrolls down i should display another 50+. All i need is lazy loading kind of. Is there any way we can achieve this?

Thanks in advance.

Personally I’d use the online search method, and if your plan to get data from multiple places, you should look into the good search api.

For the lazy loading, you should check into our collection repeat directive. This will allow you to load thousands of results but experience no performance issues.$ionicListDelegate/

Thanks for your reply. For offline search, I need to store data locally. Do you think using SQLLite is best option or File storage. Can you please provide some example on implementation details?

I am currently following this:

This is open-ended, as depends on your needs.

I personally like the article that you provided, as it does cover offline data-storage and online synch.

Thanks. I am more leaned to localstorage as data which i need to store is very limited. Thanks for sharing thoughts.