Gets or sets the attribute to group by.

Namespace: Gronewold.SphinxConnector
Assembly: Gronewold.SphinxConnector (in Gronewold.SphinxConnector.dll) Version: 2.7.0.3011 (2.7.0.3011)

Syntax

C#
public string GroupBy { get; set; }
Visual Basic
Public Property GroupBy As String
	Get
	Set

Field Value

The attribute to group by.

Examples

CopyC#
SphinxClient sphinxClient = new SphinxClient();
sphinxClient.SearchOptions.GroupBy = "last_update";
sphinxClient.SearchOptions.GroupByFunction = SphinxGroupByFunction.Day;

SphinxSearchResult searchResult = sphinxClient.Query("room", "sakila");

foreach (SphinxMatch match in searchResult.Matches)
{
    Console.WriteLine("DocumentId {0} Weight {1}", match.DocumentId, match.Weight);
}

See Also