Skip to content

Commit

Permalink
update readme and version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziad17 committed Jan 5, 2024
1 parent a83f727 commit 4645bd9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion FluentSearchEngine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageTags>Search, Search Engine, Fluent, Filtering, Index</PackageTags>
<PackageReleaseNotes>Beta Version</PackageReleaseNotes>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Version>2.2.0</Version>
<Version>2.3.0</Version>

</PropertyGroup>

Expand Down
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@





### Introduction

A fluent API that serves as a string builder to provide searching, filtering and sorting capability with using the amazing [MeiliSearch]((https://github.com/meilisearch/meilisearch))
A fluent API that serves as a string builder to provide searching, filtering and sorting capability with using the amazing [MeiliSearch]((https://github.com/meilisearch/meilisearch)), the aim is to provide a fluent interface that works on top of [meilisearch-dotnet](https://github.com/meilisearch/meilisearch-dotnet)

### Getting Started

Expand Down Expand Up @@ -72,7 +67,7 @@ public class Employee : GeoSearchModel<Guid>



##### Simple Client Usage
##### Manual Client Setup

```c#
//initiate the client
Expand All @@ -97,7 +92,7 @@ var searchQuery = new SearchQueryBuilder<Employee>("John") //can discard the sea
var result = await searchService.SearchAsync(searchQuery);
```

##### Web Application Usage
##### Quick Client Setup

Nuget Installation

Expand All @@ -108,17 +103,19 @@ Install-Package FluentSearchEngine
Program.cs

```c#
//initiate the client
var client = new MeilisearchClient("http://localhost:7700", "4ebc913989554d17acea2ee981287a26");
// with options
builder.Services.AddSearchQueryBuilder(c =>
{
c.Host = "http://localhost:7700";
c.Key = "API_KEY";
c.CollectiveHubName = "IndexBucket";
c.MaxTotalHits = 999;
c.UseCrossSearch = true;
});

//or default
builder.Services.AddSearchQueryBuilder("http://localhost:7700", "API_KEY");

//add usage for SearchService<T>
builder.Services.AddGenericSearchService();

//resolve usage of both SearchFilter and Sortable attributes
client.ResolveFluentFiltersFromAssembly(AppDomain.CurrentDomain.GetAssemblies());

//inject the client
builder.Services.AddSingleton(client);
```

EmployeesController.cs
Expand All @@ -136,7 +133,7 @@ EmployeesController.cs
_searchService = searchService;
}

[HttpGet("GetModels")]
[HttpGet("/GetModels")]
public async Task<IActionResult> Get()
{
var searchQuery = new SearchQueryBuilder<Employee>()
Expand All @@ -155,5 +152,4 @@ EmployeesController.cs



![image](https://user-images.githubusercontent.com/36865821/201401382-da52a451-228d-407b-aa44-1f27e76308ed.png)

![image](https://user-images.githubusercontent.com/36865821/201401382-da52a451-228d-407b-aa44-1f27e76308ed.png)

0 comments on commit 4645bd9

Please sign in to comment.