| Projection Class |
Namespace: SphinxConnector.FluentApi
The Projection type exposes the following members.
| Name | Description | |
|---|---|---|
| AvgTSource |
Computes the average of a sequence of values.
| |
| Count |
Computes the number of occurences of a value in a sequence of values.
| |
| CountTResult |
Computes the number of occurences of a value in a sequence of values.
| |
| CountDistinctTSource |
Computes the number of distinct occurences of a value in a sequence of values.
| |
| MaxTResult |
Computes the maximum of a sequence of values.
| |
| MinTResult |
Computes the minimum of a sequence of values.
| |
| SumTResult |
Computes the sum of a sequence of values.
|
public class Product { public int Id { get; set; } public string Name { get; set; } public string Description { get; set; } public decimal Price { get; set; } public int CategoryId { get; set; } public int VendorId { get; set; } public int Weight { get; set; } }
using (IFulltextSession fulltextSession = fulltextStore.StartSession()) { var results = fulltextSession.Query<Product>(). Match("a query"). GroupBy(p => p.CategoryId). Select(p => new { p.CategoryId, ProductsInCategory = Projection.Count() }). ToList(); }