Giter VIP home page Giter VIP logo

search-service's Introduction

Search Service

It is a Go-based service that provides search functionality using Elasticsearch for a collection of stores and their items.

Features

  • Elasticsearch with MongoDB: Utilizes Elasticsearch to perform efficient searches on store data. Using go-elasticsearch and Monstache for quick and easy integration with MongoDB.
  • Gin Web Framework: Uses the Gin web framework for handling HTTP requests and responses.
  • Structured Query: Supports structured queries, including nested queries. Integrated dashboard with Kibana.

Prerequisites

Before running the service, make sure you have the following dependencies installed:

  • Go (version 1.20 or higher)
  • Elasticsearch (version 6.x)
  • Docker

Setup

  1. Clone the repository:

    git clone https://github.com/your-username/search-service.git
    cd search-service
    
  2. Add your personal MongoDB URL to the config.toml file in the monstache directory.

    mongo-url = <url for your personal mongo instance>
    
  3. Add a .env file in the root directory. It should contain the following fields.

    PORT=<port for the api-service>
    ELASTICSEARCH_URL=<url for your personal elasticsearch instance>
    MONGODB_URL=<url for your personal mongo instance>
    MONGODB_COLLECTION=<database-name.collection-name in your mongo instance> 
    
  4. Build the docker image for the api-service. Run the following command in the root directory.

    docker build -t search-service-api:latest .
    
  5. Start the services using docker-compose. Note that it is expected your Mongo is hosted on cloud.

    sudo docker-compose compose build && sudo docker-compose up
    

    When you start the services for the first time, your Elastic/Kibana credentials will be in the application logs, on your terminal screen.

  6. After the services are up and running, you can visit the Kibana dashboard at http://localhost:5601/. Enter the credentials required. Now you can run queries!

search-service's People

Contributors

sankalp-12 avatar

Stargazers

 avatar

search-service's Issues

Future features & ideas

Features

API

Monstache

Elasticsearch

  • #5
  • Add custom indexing/configuration: fields, refresh time, batching, etc
  • Find the best-suited search queries
  • Shift to a multi-node cluster: replication, sharding, etc

Kibana

Add Pagination Support to Elasticsearch API Queries

Current Setup

  • Go Version: 1.20
  • Elasticsearch Version: 8.11.3

Expected Outcome

The current implementation lacks pagination support in Elasticsearch API queries, and as a result, retrieving large datasets becomes inefficient. The goal is to efficiently retrieve and display large result sets while minimizing resource utilization.

Configure Multiple Worker Nodes in Monstache

Current Setup

  • Monstache Version: 6.7.17
  • Elasticsearch Version: 8.11.3
  • MongoDB Version: 6.0.8

Expected Outcome

The setup and configuration for multiple worker nodes in Monstache should be explored. The goal is to optimize indexing and data syncing across a distributed environment.

Integrate Custom Analyzers in Elasticsearch for Improved Search

What are Analyzers?

Analyzers in Elasticsearch are components responsible for processing and transforming textual data during indexing and search. They consist of three main stages: character filters, tokenizers, and token filters. Custom analyzers allow us to tailor this process to our specific needs, ensuring that the search engine understands and processes our data effectively.

Guide for creating custom analyzers in Elasticsearch

Current Setup

  • Elasticsearch Version: 8.11.3
  • The existing index mapping includes the default analyzer: standard analyzer.

Expected Outcome

The aim is to enhance our search capabilities by integrating custom analyzers in Elasticsearch. Analyzers play a crucial role in processing and tokenizing text data during indexing and search operations, influencing the accuracy and relevance of search results.

Create Dashboard in Kibana for Search & Data Analytics

Current Setup

  • Elasticsearch Version: 8.11.3
  • Kibana Version: 8.11.3

Expected Outcome

The aim is to enhance our project's monitoring and analytics capabilities by implementing a comprehensive admin dashboard in Kibana. This dashboard will serve as a centralized interface for administrators to visualize and analyze search-related data, monitor system performance, and configure search settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.