java.lang.Object | |
↳ | com.pspdfkit.document.search.SearchOptions.Builder |
Builder for creating SearchOptions
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builder()
Creates a
SearchOptions.Builder with default configuration. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SearchOptions |
build()
Builds the search options.
| ||||||||||
SearchOptions.Builder |
compareOptions(EnumSet<CompareOptions> compareOptions)
Sets
CompareOptions to control various aspects of text search such as case
sensitivity or whether regular expression search is enabled. | ||||||||||
SearchOptions.Builder |
compareOptions(CompareOptions... compareOptions)
Sets
CompareOptions to control various aspects of text search such as case
sensitivity or whether regular expression search is enabled. | ||||||||||
SearchOptions.Builder |
maxSearchResults(int maxSearchResults)
Limits the maximum number of search results.
| ||||||||||
SearchOptions.Builder |
priorityPages(List<Range> priorityPages)
Sets a list of page index ranges for pages that should be searched first.
| ||||||||||
SearchOptions.Builder |
priorityPages(List<Range> priorityPages, boolean searchOnlyInPriorityPages)
Sets a list of page index ranges for pages that should be searched.
| ||||||||||
SearchOptions.Builder |
searchAnnotations(boolean searchAnnotationsTextEnabled)
Enables/disables searching in annotations contents in addition to page text.
| ||||||||||
SearchOptions.Builder |
snippetLength(int snippetLength)
Sets the maximum number of preview characters (i.e.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Builds the search options.
Sets CompareOptions
to control various aspects of text search such as case
sensitivity or whether regular expression search is enabled.
CASE_INSENSITIVE
, DIACRITIC_INSENSITIVE
and SMART_SEARCH
are used by default.
compareOptions | EnumSet of compare options to use.
|
---|
Sets CompareOptions
to control various aspects of text search such as case
sensitivity or whether regular expression search is enabled.
CASE_INSENSITIVE
, DIACRITIC_INSENSITIVE
and SMART_SEARCH
are used by default.
compareOptions | Array listing all compare options to use. |
---|
Limits the maximum number of search results. By default this is limited to {@value MAX_SEARCH_RESULTS} or to {@value MAX_SEARCH_RESULTS_LOW_MEM} on devices with little of
RAM. To turn off limiting use UNLIMITED_SEARCH_RESULTS
.
maxSearchResults | Maximum count of search results to return, or UNLIMITED_SEARCH_RESULTS to turn off limiting.
|
---|
Sets a list of page index ranges for pages that should be searched first.
Sets a list of page index ranges for pages that should be searched.
searchOnlyInPriorityPages | false to search all pages after searching
through priority pages first, true to perform the search on priority pages
only.
|
---|
Enables/disables searching in annotations contents in addition to page text.
searchAnnotationsTextEnabled | true to enable searching annotation contents,
false to disable it.
|
---|
Sets the maximum number of preview characters (i.e. the search result snippet length)
that are extracted with every search result. Setting the snippet length to 0
turns off snippet extraction, which performs better and is thus recommended if no
snippets are required. If the search term exceeds the snippet length, the resulting
snippet may be longer than the configured snippet length.
snippetLength | Maximum number of snippet characters. Defaults to {@value #DEFAULT_SNIPPET_LENGTH}. May be 0 to turn off snippet extraction.
|
---|