Click or drag to resize

SnippetsOptions Class

Represents the options for building snippets/excerpts.
Inheritance Hierarchy
SystemObject
  SphinxConnector.FluentApiSnippetsOptions

Namespace:  SphinxConnector.FluentApi
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.3.0
Syntax
[SerializableAttribute]
public class SnippetsOptions

The SnippetsOptions type exposes the following members.

Constructors
  NameDescription
Public methodSnippetsOptions
Initializes a new instance of the SnippetsOptions class.
Top
Properties
  NameDescription
Public propertyAfterMatch
Gets or sets the string to insert after a match. Starting with version 1.10-beta, a %PASSAGE_ID% macro can be used in this string. Default is </b>.
Public propertyAllowEmpty
Gets or sets a value indicating whether to allow an empty string to be returned as highlighting result when a snippet could not be generated (no keywords match, or no passages fit the limit). By default, the beginning of original text would be returned instead of an empty string. Default is false. Supported in Sphinx 1.10.1 and above.
Public propertyAround
Gets or sets how much words to pick around each matching keywords block. Default is 5.
Public propertyBeforeMatch
Gets or sets the string to insert before a match. Starting with version 1.10-beta, a %PASSAGE_ID% macro can be used in this string. The macro is replaced with an incrementing passage number within a current snippet. Numbering starts at 1 by default but can be overridden with by setting StartPassageId. In a multi-document call, %PASSAGE_ID% would restart at every given document. Default is <b>.
Public propertyChunkSeparator
Gets or sets the separator which will be used to separate chunks of text. Default is " ... ".
Public propertyEmitZones
Gets or sets a value indicatin whether to emit an HTML tag with an enclosing zone name before each passage. Default is false. Supported in Sphinx 2.0.1 and above.
Public propertyExactPhrase
Gets or sets a value indicating whether to highlight exact query phrase matches only instead of individual keywords. Default is false.
Public propertyForceAllWords
Gets or sets a value indicating whether to ignores the snippet length limit until it includes all the keywords. Default is false. Supported in Sphinx 1.10.1 and above.
Public propertyHtmlStripMode
Gets or sets the HTML strip mode. Default is Index. Supported in Sphinx 1.10.1 and above.
Public propertyLimit
Gets or sets the maximum snippet size. Default is 256.
Public propertyLimitPassages
Limits the maximum number of passages that can be included into the snippet. Default is 0. Supported in Sphinx 1.10.1 and above.
Public propertyLimitWords
Limits the maximum number of keywords that can be included into the snippet. Default is 0. Supported in Sphinx 1.10.1 and above.
Public propertyLoadFiles
Gets or sets a value indicating whether Whether to handle the data parameter of BuildSnippetsTDocument(IEnumerableString, String) as data to extract snippets from (default behavior), or to treat it as file names, and load data from specified files on the server side. Default is false. Supported in Sphinx 1.10.1 and above.
Public propertyLoadFilesScattered
The source files for snippets could be distributed among different agents, and the main daemon will merge together all non-erroneous results. Default is false. Supported in Sphinx 2.0.2 and above.
Public propertyPassageBoundary
Ensures that passages do not cross a sentence, paragraph, or zone boundary (when used with an index that has the respective indexing settings enabled). Supported in Sphinx 2.0.1 and above.
Public propertyQueryMode
Gets or sets a value indicating whether to handle the highlight words parameter of the BuildSnippets method as a query in extended syntax, or as a bag of words (default behavior). Default is false. Supported in Sphinx 1.10.1 and above. This option has been obsoleted in Manticore since 3.2.2.
Public propertyStartPassageId
Specifies the starting value of %PASSAGE_ID% macro (that gets detected and expanded in BeforeMatch, AfterMatch. Default is 1. Supported in Sphinx 1.10.1 and above.
Public propertyUseBoundaries
Gets or sets a value indicating whether to use boundaries. Default is false.
Public propertyWeightOrder
Gets or sets a value indicating whether to sort the extracted passages in order of relevance (decreasing weight), or in order of appearance in the document (increasing position). Default is false.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also