Class Query

This class represents a search query that can be performed on a document with a TextSearcher

Inheritance
System.Object
Query
Implements
Namespace: PSPDFKit.Search
Assembly: PSPDFKit.dll
Syntax
public sealed class Query : IQuery

Constructors

Query(String)

The search term string.

Declaration
[Obsolete("Please use one of the static constructor methods.")]
public Query(string searchTerm)
Parameters
Type Name Description
System.String searchTerm

Properties

CompareOptions

Declaration
public CompareOptions CompareOptions { get; set; }
Property Value
Type Description
CompareOptions

GenerateTextPreviews

Set to generate a text preview. Default is true.

Declaration
public bool GenerateTextPreviews { get; set; }
Property Value
Type Description
System.Boolean

MaximumSearchResults

Specifies the maximum search results returned.

Declaration
public int MaximumSearchResults { get; set; }
Property Value
Type Description
System.Int32

PreviewRange

Sets the range of the preview that should be generated.

Declaration
public Range PreviewRange { get; set; }
Property Value
Type Description
Range

PriorityPages

Search the pages in this list of Ranges first. Each Range specifies a starting page index and a length.

Declaration
public IList<Range> PriorityPages { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<Range>

ReturnEmptyResults

Set to true to return an empty result set for pages with no matches.

Declaration
public bool ReturnEmptyResults { get; set; }
Property Value
Type Description
System.Boolean

SearchAllPages

Set to specify whether all pages should be searched.

Declaration
public bool SearchAllPages { get; set; }
Property Value
Type Description
System.Boolean

SearchAnnotations

Set to search the content of annotations.

Declaration
public bool SearchAnnotations { get; set; }
Property Value
Type Description
System.Boolean

SearchTerm

The search term string.

Declaration
public string SearchTerm { get; set; }
Property Value
Type Description
System.String

SearchType

Declaration
public SearchType SearchType { get; set; }
Property Value
Type Description
SearchType

Methods

FromRegex(String)

Creates a Query for searching using a regular expression.

Declaration
public static Query FromRegex(string expression)
Parameters
Type Name Description
System.String expression
Returns
Type Description
Query

FromSearchPattern(SearchPattern)

Creates a Query for searching using one of the preset SearchPatterns.

Declaration
public static Query FromSearchPattern(SearchPattern pattern)
Parameters
Type Name Description
SearchPattern pattern
Returns
Type Description
Query

FromText(String)

Creates a Query for searching plain text.

Declaration
public static Query FromText(string searchTerm)
Parameters
Type Name Description
System.String searchTerm
Returns
Type Description
Query

Implements

IQuery