Class QueryOptions
-
- All Implemented Interfaces:
public class QueryOptions
Detailed options for querying the FTS database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
QueryOptions.Builder
Builder used to construct QueryOptions instance.
By default the number of returned search results is limited to 500 to limit possible search time. Use maximumPreviewResultsTotal and maximumSearchResultsTotal to change this default.
-
Field Summary
Fields Modifier and Type Field Description public final int
maximumSearchResultsPerDocument
public final int
maximumSearchResultsTotal
public final int
maximumPreviewResultsPerDocument
public final int
maximumPreviewResultsTotal
public final Range
previewRange
-
Method Summary
Modifier and Type Method Description int
getMaximumSearchResultsPerDocument()
Returns maximum number of results in each document. int
getMaximumSearchResultsTotal()
Returns maximum number of results for the search query. int
getMaximumPreviewResultsPerDocument()
Returns maximum number of preview results in each document. int
getMaximumPreviewResultsTotal()
Returns maximum number of preview results for the search query. Range
getPreviewRange()
Returns length of text preview snippet. boolean
shouldMatchExactPhrases()
Indicates whether exact phrases should be matched. boolean
shouldMatchExactWords()
Indicates whether exact words should be matched when searching. boolean
shouldIgnoreAnnotations()
Indicates whether annotations should be ignored when querying. boolean
shouldIgnoreDocumentText()
Indicates whether document text should be ignored when querying. boolean
shouldGenerateTextPreviews()
Indicates whether text previews should be generated. -
-
Method Detail
-
getMaximumSearchResultsPerDocument
int getMaximumSearchResultsPerDocument()
Returns maximum number of results in each document.
- Returns:
Maximum number of results per document.
-
getMaximumSearchResultsTotal
int getMaximumSearchResultsTotal()
Returns maximum number of results for the search query.
- Returns:
Maximum number of results in the search query
-
getMaximumPreviewResultsPerDocument
int getMaximumPreviewResultsPerDocument()
Returns maximum number of preview results in each document.
- Returns:
Maximum number of preview results per document.
-
getMaximumPreviewResultsTotal
int getMaximumPreviewResultsTotal()
Returns maximum number of preview results for the search query.
- Returns:
Maximum number of preview results in the search query.
-
getPreviewRange
Range getPreviewRange()
Returns length of text preview snippet.
- Returns:
Pair of (starting position, length) representing search preview snippet start and length.
-
shouldMatchExactPhrases
boolean shouldMatchExactPhrases()
Indicates whether exact phrases should be matched.
- Returns:
true
if exact phrases should be matched,false
otherwise.
-
shouldMatchExactWords
boolean shouldMatchExactWords()
Indicates whether exact words should be matched when searching.
- Returns:
true
if exact words should be matched,false
otherwise.
-
shouldIgnoreAnnotations
boolean shouldIgnoreAnnotations()
Indicates whether annotations should be ignored when querying.
- Returns:
true
if annotations should be ignored,false
if they should be included.
-
shouldIgnoreDocumentText
boolean shouldIgnoreDocumentText()
Indicates whether document text should be ignored when querying.
- Returns:
true
if document text should be ignored,false
if it should be included.
-
shouldGenerateTextPreviews
boolean shouldGenerateTextPreviews()
Indicates whether text previews should be generated.
- Returns:
true
if text previews should be generated,false
otherwise.
-
-
-
-