Chd.Library.ElasticSearch
9.0.0
See the version list below for details.
dotnet add package Chd.Library.ElasticSearch --version 9.0.0
NuGet\Install-Package Chd.Library.ElasticSearch -Version 9.0.0
<PackageReference Include="Chd.Library.ElasticSearch" Version="9.0.0" />
paket add Chd.Library.ElasticSearch --version 9.0.0
#r "nuget: Chd.Library.ElasticSearch, 9.0.0"
// Install Chd.Library.ElasticSearch as a Cake Addin #addin nuget:?package=Chd.Library.ElasticSearch&version=9.0.0 // Install Chd.Library.ElasticSearch as a Cake Tool #tool nuget:?package=Chd.Library.ElasticSearch&version=9.0.0
Searching and Indexing library for .Net Core
Chd (cleverly handle difficulty) library helps you cleverly handle difficulty, writing code fastly and do your application stable.
📝 Table of Contents
🧐 About
Elasticsearch allows you to store, search, and analyze huge volumes of data quickly and in near real-time and give back answers in milliseconds.
🏁 Getting Started
It is amazing that when I index and search hundreds of books with this library, it can bring the results in under a second.
Prerequisites
You must use .net core 8.0 or higher
🔧 Running the tests
[TestMethod]
public void TestMethod1()
{
Libary.Common.Searching.Indexer indexer = new Libary.Common.Searching.Indexer("C://Index");
indexer.WriteIndex(new System.Collections.Generic.List<SampleContainerClass> { new()
{ S1 = "Demek şimdi gidiyorsun beni böyle bırakıp merdivenlerin dibine...",S2="dip" } }, true);
indexer.WriteIndex(new System.Collections.Generic.List<SampleContainerClass> { new()
{ S1 = "Demek şimdi gidiyorsun beni böyle bırakıp merdivenlerin hadi git",S2="gitme" } }, false);
var r1 = indexer.Search<SampleContainerClass>("beni bırakıp", X => X.S1); //result[0]=>score:0.954 result[1]=>score:0.954
var r2 = indexer.Search<SampleContainerClass>("akıp git", X => X.S1); //result[0]=>score:0.254
var r3 = indexer.Search<SampleContainerClass>("bırakıp git", X => X.S1);//result[0]=>score:0.954 result[1]=>score:0.047
var r4 = indexer.Search<SampleContainerClass>("gitme", X => X.S2);//result[0]=>score:1
}
class SampleContainerClass
{
public string S1 { get; set; }
public string S2 { get; set; }
}
Test Result
If you examine the scores of the searched words among the indexed words, you will understand the logic of the search.
🎈 Usage
Firstly create an instance of "Indexer" class with path constructor parameter. Then call the "WriteIndex" method and enter the class you will index into. If you enter "deleteall" parameter true, the writeindex method deletes the old indexing and adds it. If you enter "false" it adds it to the old indexing.
✍️ Authors
- Mehmet Yoldaş - Linkedin
See also the list of contributors who participated in this project.
🎉 Acknowledgements
Thank you for using my library.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- Lucene.Net (>= 4.8.0-beta00016)
- Lucene.Net.Analysis.Common (>= 4.8.0-beta00016)
- Lucene.Net.QueryParser (>= 4.8.0-beta00016)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.