/reSearch_django

reSearch is a simple web API that takes in multiple paragraphs(documents) of text, assigns a unique ID to each paragraph and stores the words to paragraph mappings on an inverted index.Given a word to search for, it lists out the top 10 paragraphs in which the word is present.

Primary LanguagePython

reSearch_django

API Endpoints

HTTP Method : POST

Content :

{
"data" : "hello world"
}

Response :

{
    "status": 1
}

HTTP Method : GET

Content :

{
"data" : "hello"
}

Response :

{
    "docs": [
        [
            1,
            0,
            "hello world"
        ]
    ]
}

Note : 1 is the frequency and 0 is the id assigned to the document


HTTP Method : GET

Response :

{
    "info": "All the indexes has been cleared."
}

HTTP Method : GET

Response :

{
    "docs": [
        [
            0,
            "hello world"
        ]
    ]
}