{"id":15013811,"url":"https://github.com/arsenyyankovsky/lucene-serverless","last_synced_at":"2025-04-12T05:46:59.607Z","repository":{"id":43681272,"uuid":"345140419","full_name":"ArsenyYankovsky/lucene-serverless","owner":"ArsenyYankovsky","description":"A proof-of-concept serverless full-text search solution built with Apache Lucene and Quarkus framework.","archived":false,"fork":false,"pushed_at":"2024-01-09T21:17:38.000Z","size":123685,"stargazers_count":49,"open_issues_count":0,"forks_count":20,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-20T18:13:07.723Z","etag":null,"topics":["java","lucene","quarkus","serverless"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArsenyYankovsky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-06T16:27:50.000Z","updated_at":"2024-08-17T21:12:27.000Z","dependencies_parsed_at":"2024-01-14T08:20:53.770Z","dependency_job_id":"bab00ec5-efa8-4924-bcc5-6851aaaaf68e","html_url":"https://github.com/ArsenyYankovsky/lucene-serverless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArsenyYankovsky%2Flucene-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArsenyYankovsky%2Flucene-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArsenyYankovsky%2Flucene-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArsenyYankovsky%2Flucene-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArsenyYankovsky","download_url":"https://codeload.github.com/ArsenyYankovsky/lucene-serverless/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239926616,"owners_count":19719738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","lucene","quarkus","serverless"],"created_at":"2024-09-24T19:44:48.662Z","updated_at":"2025-02-20T22:31:54.810Z","avatar_url":"https://github.com/ArsenyYankovsky.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lucene Serverless\n\nThis project demonstrates a proof-of-concept serverless full-text search solution built with Apache Lucene and Quarkus framework.\n\n✔️ No servers\n\n✔️ No fixed costs\n\n✔️ Low (250-300ms) cold starts\n\n⚠️ Better deletion policy is required. Right now old segment files are not deleted as a simple workaround to handle concurrent reads and writes\n\nℹ️ Cost can be controlled via several factors:\n\n* EFS' [Elastic](https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes) throughput mode cost more $$, but scales better up and down\n* Lambda's [Provisioned Concurrency](https://docs.aws.amazon.com/lambda/latest/dg/provisioned-concurrency.html) provides faster, more consistent first request times but costs more $$\n* Lambda memory is kept ~256mb, tune based on index size and observed speeds. Note: vCPU is allocated proportional to memory.\n\nPlease note that the project is not ready for production since I haven't tested it under a prolonged load and to be honest interfaces need to be nicer.\n\nRead the blog post about it [here](https://medium.com/@arsenyyankovski/serverless-full-text-search-with-aws-lambda-and-efs-cf24e1b6fe3b)\n\n## Prerequisites\n- [Serverless framework \u003e= 1.56.1](https://serverless.com/framework/docs/getting-started/)\n- AWS account\n\n## Run it\n1. Replace region, vpc id and subnets in the `serverless.yml` file\n\n2. Deploy the stack\n   `sls deploy`\n\n3. Don't forget to remove it if you're not planning to use it\n   `sls remove`\n\n### Index a document\n\nURL: `https://\u003capi-id\u003e.execute-api.\u003cregion\u003e.amazonaws.com/dev/index`\n\nHTTP method: POST\n\nExample request body:\n\n```json\n{\n  \"indexName\": \"books\",\n  \"documents\": [\n    {\n      \"name\": \"The Foundation\",\n      \"author\": \"Isaac Asimov\"\n    }\n  ]\n}\n```\n\n### Query documents\n\nURL: `https://\u003capi-id\u003e.execute-api.\u003cregion\u003e.amazonaws.com/dev/query`\n\nHTTP method: POST\n\nExample request body:\n\n```json\n{\n   \"indexName\": \"books\",\n   \"query\": \"author:isaac\"\n}\n```\n\nExample response body:\n\n```json\n{\n  \"totalDocuments\": \"1\",\n  \"documents\": [\n    {\n      \"author\": \"Isaac Asimov\",\n      \"name\": \"The Foundation\"\n    }\n  ]\n}\n```\n\n## Build native image\n`./mvnw clean package`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsenyyankovsky%2Flucene-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsenyyankovsky%2Flucene-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsenyyankovsky%2Flucene-serverless/lists"}