Update README.md
This commit is contained in:
parent
68852c9050
commit
a90654a5b0
48
README.md
48
README.md
@ -1,6 +1,8 @@
|
|||||||
# MeiliSearch .NET Embedded
|
---
|
||||||
|
|
||||||
[](https://www.nuget.org/packages/YourPackageName)
|
# MeiliSearch .NET Embedded
|
||||||
|
|
||||||
|
[](https://www.nuget.org/packages/D4M13N-D3V/meilisearch.NET)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@ -16,8 +18,6 @@ MeiliSearch .NET Integration is a NuGet package that seamlessly embeds MeiliSear
|
|||||||
- [ ] **Resource Monitoring**: Monitor the resources being used including storage by your MeiliSearch.
|
- [ ] **Resource Monitoring**: Monitor the resources being used including storage by your MeiliSearch.
|
||||||
- [ ] **Future Index Management**: Upcoming feature to automatically compress and decompress indexes for optimized local storage.
|
- [ ] **Future Index Management**: Upcoming feature to automatically compress and decompress indexes for optimized local storage.
|
||||||
|
|
||||||
Here’s a revised section for your README that includes details about installing your package from your GitHub Package repository:
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To add the MeiliSearch .NET Integration package to your project, you can install it directly from the GitHub Package repository. Follow the steps below based on your preferred method:
|
To add the MeiliSearch .NET Integration package to your project, you can install it directly from the GitHub Package repository. Follow the steps below based on your preferred method:
|
||||||
@ -28,7 +28,7 @@ Open the Package Manager Console in Visual Studio and run the following command:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
Install-Package D4M13N-D3V/meilisearch.NET
|
Install-Package D4M13N-D3V/meilisearch.NET
|
||||||
|
```
|
||||||
|
|
||||||
### .NET CLI
|
### .NET CLI
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ To install the package, ensure your project is configured to use GitHub Packages
|
|||||||
|
|
||||||
Make sure to replace `YOUR_GITHUB_USERNAME` with your GitHub username and `YOUR_GITHUB_TOKEN` with a personal access token that has read access to packages.
|
Make sure to replace `YOUR_GITHUB_USERNAME` with your GitHub username and `YOUR_GITHUB_TOKEN` with a personal access token that has read access to packages.
|
||||||
|
|
||||||
### AppSettings Options
|
## AppSettings Options
|
||||||
|
|
||||||
- **Port**: The port on which MeiliSearch will run (default is `7700`).
|
- **Port**: The port on which MeiliSearch will run (default is `7700`).
|
||||||
- **UiEnabled**: A boolean value to enable or disable the MeiliSearch UI (default is `true`).
|
- **UiEnabled**: A boolean value to enable or disable the MeiliSearch UI (default is `true`).
|
||||||
@ -66,7 +66,7 @@ Make sure to replace `YOUR_GITHUB_USERNAME` with your GitHub username and `YOUR_
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
To set up the MeiliSearch service in your application, you'll need to configure dependency injection. Here’s an example of how to do that:
|
To set up the MeiliSearch service in your application, configure dependency injection as shown below:
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using System.Net;
|
using System.Net;
|
||||||
@ -88,48 +88,43 @@ app.Run();
|
|||||||
Console.ReadLine();
|
Console.ReadLine();
|
||||||
```
|
```
|
||||||
|
|
||||||
### MeiliSearchService Class Usage Guide
|
## MeiliSearchService Class Usage Guide
|
||||||
|
|
||||||
This class is designed to manage the lifecycle of a MeiliSearch process. It provides methods to start, stop, and restart the MeiliSearch process.
|
### Methods
|
||||||
|
|
||||||
#### Methods
|
#### Start
|
||||||
|
|
||||||
##### Start
|
Starts the MeiliSearch process. Logs the start of the process, sets the status to **Starting**, and attempts to start the process.
|
||||||
This method is used to start the MeiliSearch process. It logs the start of the process, sets the status to **Starting**, and attempts to start the process. If the process starts successfully, the status is set to **Running** and a success message is logged. If it fails to start, an error message is logged and the exception is rethrown.
|
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
MeiliSearchService service = new MeiliSearchService();
|
MeiliSearchService service = new MeiliSearchService();
|
||||||
service.Start();
|
service.Start();
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Stop
|
#### Stop
|
||||||
This method is used to stop the MeiliSearch process. It first checks if the process is running. If not, it logs a warning and throws an exception. If the process is running, it logs the stop of the process, sets the status to **Stopping**, and attempts to stop the process. If the process stops successfully, the status is set to **Stopped** and a success message is logged.
|
|
||||||
|
Stops the MeiliSearch process. Logs the stop of the process, sets the status to **Stopping**, and attempts to stop the process.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
service.Stop();
|
service.Stop();
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Restart
|
#### Restart
|
||||||
This method is used to restart the MeiliSearch process. It logs the restart of the process, stops the process using the **Stop** method, and starts the process using the **Start** method.
|
|
||||||
|
Restarts the MeiliSearch process. Stops the process using the **Stop** method and starts it using the **Start** method.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
service.Restart();
|
service.Restart();
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Status
|
### Status
|
||||||
The **Status** property indicates the current status of the MeiliSearch process. It can be one of the following values:
|
|
||||||
- **Starting**: The process is in the process of starting.
|
Indicates the current status of the MeiliSearch process.
|
||||||
- **Running**: The process is currently running.
|
|
||||||
- **Stopping**: The process is in the process of stopping.
|
|
||||||
- **Stopped**: The process is currently stopped.
|
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
MeiliSearchStatus status = service.Status;
|
MeiliSearchStatus status = service.Status;
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note**: Please note that you should handle exceptions appropriately when using these methods, as they may throw exceptions if the process fails to start or stop.
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||||
@ -145,6 +140,5 @@ For any issues or questions, please open an issue on GitHub or contact us via [y
|
|||||||
---
|
---
|
||||||
|
|
||||||
Feel free to customize this README as necessary for your package, especially regarding the project name and license details!
|
Feel free to customize this README as necessary for your package, especially regarding the project name and license details!
|
||||||
```
|
|
||||||
|
|
||||||
This revision includes details about the API key regeneration and how to specify a fixed API key if desired.
|
---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user