You need to implement the content provider component for your application. The "private" content provider will allow you to do "custom search" like you desire. As per documentation:
However, you do need your own provider to provide custom search suggestions in your own application.
The NotePad example can provide you with a good starting point on implementing a "private" content provider. By "private", i mean that you are not sharing the ListView data with any other app or process running on your device or remotely.
HTH