You can not detect the percent processed, but you can detect the start of the query and when it is complete.
Add a progress bar to your component
Set the "Indeterminate" property to true.
Set the visibility to false.
When your code starts its search set the progress bar visibility to true
When the query is complete set the visibility of the progress bar back to false.
Hope that helps.
Drew