ReSight.Core.Search
1.7.0
dotnet add package ReSight.Core.Search --version 1.7.0
NuGet\Install-Package ReSight.Core.Search -Version 1.7.0
<PackageReference Include="ReSight.Core.Search" Version="1.7.0" />
<PackageVersion Include="ReSight.Core.Search" Version="1.7.0" />
<PackageReference Include="ReSight.Core.Search" />
paket add ReSight.Core.Search --version 1.7.0
#r "nuget: ReSight.Core.Search, 1.7.0"
#:package ReSight.Core.Search@1.7.0
#addin nuget:?package=ReSight.Core.Search&version=1.7.0
#tool nuget:?package=ReSight.Core.Search&version=1.7.0
ReSight.Core.Search
The ReSight.Core.Search library is designed to enhance search functionality in .NET applications. It provides a robust set of classes for building dynamic search queries, including support for filters, sorting, and field selection. This library aims to simplify the construction of complex search criteria, making it easier to implement advanced search features.
Features
- Dynamic Filter Creation: Easily create filters based on field names, comparison operators, and values.
- Operator Support: Includes a comprehensive set of operators for expressing search conditions.
- Sorting: Define sorting keys with ascending or descending order.
- Field Selection: Specify which fields to include in your search results.
- Expression Support: Use expressions to specify fields and values for type-safe queries.
Getting Started
Installation
This library is conceptual and meant to be included in your .NET projects as a shared library or as part of your solution. It is available as a NuGet package, you can add it through:
dotnet add package ReSight.Core.Search
Usage
Creating Filters
You can create filters for your queries using the Filter<T> or Filter<T, TValue> classes:
using ReSight.Core.Search; var filter = new Filter<string>("FieldName", Operator.Equal, "Value");For type-safe filters based on expressions:
var typeSafeFilter = new Filter<MyClass, string>(x => x.MyField, Operator.Like, "%value%");Building a Query Request
Combine multiple filters, specify fields, and define sorting to create a QueryRequest:
var queryRequest = new QueryRequest { Fields = new List<string> { "Field1", "Field2" }, Filters = new List<IFilter> { filter, typeSafeFilter }, Sort = new List<SortKey> { new SortKey("Field1", SortOrder.Ascending) } };
License
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- ReSight.Core.Analytics (>= 1.0.2)
-
net8.0
- ReSight.Core.Analytics (>= 1.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.