GithubHelp home page GithubHelp logo

hsa-homework-11's Introduction

Highload Software Architecture 8 Lesson 11 Homework

Index & Autocomplete

Test project setup

The demo is written in Kotlin/Quarkus and uses docker-compose to run Elasticsearch.

The com/example/Demo.kt/runDemo function is used to set up index and run autocomplete queries. It also produces a report in a Markdown format. The final report is located in the REPORT.md file.

Please refer to the REPORT.md file for the information on mapping configuration and queries.

After launching the demo, you can open simple UI on http://localhost:8080 to try the queries yourself.

Issues

I couldn't find a way to make Elasticsearch to leverage exactly 3 typos while performing suggestion search. The best I've managed to achieve is the empirically found coefficients of "minimum_should_match": "7<30% 10<60%" on the search query, which gives relatively stable results for words longer than 9 characters.

Words shorter than 9 characters are mostly handled by the fuzzy suggestion search, which handles up to 2 typos.

How to build and run

Start up Elasticsearch

docker-compose up -d

Build and run demo application (Requires Java 17+)

./gradlew build && \
java -jar build/quarkus-app/quarkus-run.jar

You can also run application in dev mode that enables live coding using:

./gradlew quarkusDev

hsa-homework-11's People

Watchers

Serhii Samoilenko avatar

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.