Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/igor-karpukhin/python-redis-text-search


https://github.com/igor-karpukhin/python-redis-text-search

pyhton redis search-engine

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# Description
Service to store texts and search words in them using Redis as a storage.

# Installation
Hit **docker-compose up -d --build** to build container and launch the environment

# API
By default, service will run on port **9000**. Example: **http://127.0.0.1:9000/**

* Show number of saved documents: **/documents**
* Example: ```curl -v -X GET http://127.0.0.1:9000/documents```
* Index new document: POST **/document/id**
* ``` curl -H "Content-Type: application/json" -X POST -d "the third document text" http://127.0.0.1:9000/document/1```
* Get document by ID: GET **/document/id**
* ```curl -v -X GET http://127.0.0.1:9000/document/1```
* Search word over all saved documents: **/document?q=word**
* ```curl -v -X GET http://127.0.0.1:9000/document?q=sample```
* Delete document by ID: **/document/id**
* ```curl -v -X DELETE http://127.0.0.1:9000/document/1```