forked from Shazwazza/Examine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
1,708 additions
and
736 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
|
||
namespace Examine.Search | ||
{ | ||
|
||
/// <summary> | ||
/// Faceting operations | ||
/// </summary> | ||
public interface IFacetOperations : IQueryExecutor | ||
{ | ||
/// <summary> | ||
/// Add a facet string to the current query | ||
/// </summary> | ||
/// <param name="field"></param> | ||
/// <param name="facetConfiguration"></param> | ||
/// <returns></returns> | ||
IFacetOperations Facet(string field, Action<IFacetQueryField> facetConfiguration = null); | ||
|
||
/// <summary> | ||
/// Add a facet string to the current query, filtered by a single value or multiple values | ||
/// </summary> | ||
/// <param name="field"></param> | ||
/// <param name="facetConfiguration"></param> | ||
/// <param name="values"></param> | ||
/// <returns></returns> | ||
IFacetOperations Facet(string field, Action<IFacetQueryField> facetConfiguration = null, params string[] values); | ||
|
||
/// <summary> | ||
/// Add a range facet to the current query | ||
/// </summary> | ||
IFacetOperations Facet(string field, params DoubleRange[] doubleRanges); | ||
|
||
/// <summary> | ||
/// Add a range facet to the current query | ||
/// </summary> | ||
IFacetOperations Facet(string field, params FloatRange[] floatRanges); | ||
|
||
/// <summary> | ||
/// Add a range facet to the current query | ||
/// </summary> | ||
IFacetOperations Facet(string field, params Int64Range[] longRanges); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
|
||
namespace Examine.Search | ||
{ | ||
public static class OrderingExtensions | ||
{ | ||
/// <summary> | ||
/// Allows for selecting facets to return in your query | ||
/// </summary> | ||
/// <param name="facets"></param> | ||
/// <returns></returns> | ||
public static IQueryExecutor WithFacets(this IOrdering ordering, Action<IFacetOperations> facets) | ||
{ | ||
if (ordering is IFaceting faceting) | ||
{ | ||
return faceting.WithFacets(facets); | ||
} | ||
|
||
throw new NotSupportedException("The current implementation of Examine does not support faceting"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.