This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/android/search/indexed-full-text-search/matching-options.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PDF search matching options on Android | Nutrient SDK

Pass a QueryOptions object to PdfLibrary’s search() method to configure matching and results.

The following options are available:

NameTypeDescription
generateTextPreviewsBooleanRetrieves preview snippets of text when searching and delivers them in the onSearchPreviewsGenerated() callback.
maximumSearchResultsTotalintThe maximum amount of search results for the total of all documents.
maximumSearchResultsPerDocumentintThe maximum amount of search results per document.
matchExactWordsBooleanOnly matches exact words. For example, “something” doesn’t match “some.”
matchExactPhrasesBooleanOnly matches exact phrases. For example, “this is a test” doesn’t match “this is a quick test.”

Advanced configuration

Use these PdfLibrary methods to control reverse-text storage:

MethodTypeDefaultDescription
setSaveReverseText()/getSaveReverseText()BooleantrueControls whether the library stores reversed PDF text. This approximately doubles the cache size and enables ends-with searches.