Thank you for your query.
In short, yes you can write an alternative search routine.
This sort of thing would be done using the GroupWise Object API. You can choose either the .Find/.FindMessages method of a message collection, or else create a Query object using Account.CreateQuery. A query is appropriate for ‘large’ result sets, and can take a long time to complete.
In both cases, you will need to define an appropriate filter expression to search for the relevant item(s). For more on this, see the online documentation on filter expressions.
I hope this helps.