StarAcademy.CodeStar1401.Team02.SearchEngine
1.4.2
See the version list below for details.
dotnet add package StarAcademy.CodeStar1401.Team02.SearchEngine --version 1.4.2
NuGet\Install-Package StarAcademy.CodeStar1401.Team02.SearchEngine -Version 1.4.2
<PackageReference Include="StarAcademy.CodeStar1401.Team02.SearchEngine" Version="1.4.2" />
paket add StarAcademy.CodeStar1401.Team02.SearchEngine --version 1.4.2
#r "nuget: StarAcademy.CodeStar1401.Team02.SearchEngine, 1.4.2"
// Install StarAcademy.CodeStar1401.Team02.SearchEngine as a Cake Addin #addin nuget:?package=StarAcademy.CodeStar1401.Team02.SearchEngine&version=1.4.2 // Install StarAcademy.CodeStar1401.Team02.SearchEngine as a Cake Tool #tool nuget:?package=StarAcademy.CodeStar1401.Team02.SearchEngine&version=1.4.2
Search Engine
Description
simple search engine simulation to understand how inverted-indexing works. you can search a word, and it will show you the documents containing that specific word.
Features
- support for AND/OR operations
- finding files not including a word (exclusion)
Installation
simple search (single word)
after running the project you can simply type a word and the documents including that word will be returned.
ex: we want to fine all documents containing word "insert", so we simply type it:
insert
then you would be provided with such a result, showing name and number of documents including the word "insert":
number of search results: 10
[58876, 58823, 59489, 59072, 58139, 59478, 58773, 59639, 58946, 59546]
advanced search (and/or/exclusion)
imagine we are looking for documents, fitting with the requirments below:
- include both "test" and "less" words
- contains at least one of the words "hello" or "more" or "year"
- without the word "bad"
the good news is that we can still use this search engine considering these signs:
- add a
+
sign before the words you want to have at least one of them in your search - for excluding a word, simply add a
-
sign before that - words without
+
or-
would be treated as the words you want them all to be contained in the search result.
So, we might use the below query for such a search:
test less -bad +hello +year +more
and the result would be:
number of search results: 3
[59245, 59435, 59126]
Notice: order is not important!
End of program
simply type -1
to finish the program.
Interfaces
Query
you can also create any kind of query that you want, simply by implementing Query interface. imagine we want to add the feature of querying by sentences (complete human language support); this can be simply done without violating the Open/Closed principle of SOLID.
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 was computed. 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. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.