🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

github.com/ereminiu/autocomplete

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/ereminiu/autocomplete

v0.0.0-20230930121203-9c6373bf849e
Source
Go
Version published
Created
Source

Autocomplete System

REST API for autocomplete system aka "Top K(5) most searched queries" via Trie datastructure to get most popular queries. Server is running on port 6000 by default.

Handlers

[POST] /search?q=kat&add=false

The "add" param is using only at the end of the search query to insert into database one.

Response:

{
    "requests": [
        "kate",
        "katrina",
        "katie",
        "kathy",
        "kathleen"
    ]
}

[POST] /rebuild is using to rebuild trie with queries and their frequencies from database.

Response:

{
    "message": "Trie has been reinited from database"
}

FAQs

Package last updated on 30 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts