Skip to content

EduKav1813/my-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

my-elasticsearch

Overview

The goal of this project is to implement a primitive version of the elasticsearch. This project is purely for educational purposes and is not to be used in any production environment.

While simplistic, this project should be modular and open for future extensions, even if none will come.

What you need to run it

The main dependencies are:

  1. Python 3.8 or older.
  2. MongoDB.

The current version of the project only supports the MongoDB installed locally as a database.

How to run

  1. Install the project with poetry install

  2. Use the poetry run cli to access the CLI. It will show you the schema of the project. The thing that interests you the most is the COMMANDS section.

  3. Pick a command from the COMMAND section and run it.

    For example: poetry run cli insert_document --name='MyDocument' --content='I love reading tutorials'

    If the command you want to run requires some arguments, it will let you know.

The basic commands are the insert_document and search. The insert_document populates the database with documents, and the search command allows you to search through your documents with a query.

The Requirements for the project

The project consists out of 3 main parts:

  1. Database - functionality to store data and use it for search purposes.

    1. Add documents.
    2. Delete documents.
    3. Clear the entire database.
  2. Search engine - functionality to query the database with a specific query and return the result. For simplicity, only one type of search will be available - word match, which will return documents with the closest word match, where longer words have more weight.

    1. The algorithm to handle the search
    2. Search across a specific collection.
    3. Limit query output.
  3. CLI interface - the program will be accessed from the cli interface.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages