From The Document Foundation Wiki
The search is performed using the createSearchDescriptor method of the com.sun.star.util.XSearchable[1] interface along with the com.sun.star.util.SearchDescriptor service[2] to define the properties of the search, including: search text, case sensitivity, use of regular expressions, etc.