 | SphinxClientBuildExcerpts Method (IEnumerableString, String, String) |
Builds excerpts for the given documents using the settings from the given index name and
inserting the default values for
BeforeMatch and
AfterMatch before and after the given highlight
words.
Namespace:
SphinxConnector.NativeApi
Assembly:
SphinxConnector (in SphinxConnector.dll) Version: 5.4.1
Syntaxpublic IList<string> BuildExcerpts(
IEnumerable<string> documents,
string indexName,
string highlightWords
)
Public Function BuildExcerpts (
documents As IEnumerable(Of String),
indexName As String,
highlightWords As String
) As IList(Of String)
Parameters
- documents
- Type: System.Collections.GenericIEnumerableString
The documents to build excerpts for. - indexName
- Type: SystemString
The name of the index to use settings from. - highlightWords
- Type: SystemString
The words to highlight.
Return Value
Type:
IListStringAn IList<string> containing the excerpts.
Exceptions
Examples SphinxClient sphinxClient = new SphinxClient();
List<string> documents = new List<string>();
documents.Add("This is my first document.");
documents.Add("This is my second document.");
IList<string> result = sphinxClient.BuildExcerpts(documents, "sakila", "is");
foreach (string entry in result)
{
Console.WriteLine(entry);
}
See Also