{"id":22404595,"url":"https://github.com/vick-ram/full-text-search","last_synced_at":"2026-05-01T15:39:08.061Z","repository":{"id":236576918,"uuid":"792890471","full_name":"vick-ram/full-text-search","owner":"vick-ram","description":"This project works on Ktor + exposed + PostreSQL full-text-search which isn't not supported outside of the box by Ktor","archived":false,"fork":false,"pushed_at":"2024-04-28T09:53:22.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T01:16:59.661Z","etag":null,"topics":["dao","exposed","full-text-search","hikaricp","ktor","postgresql","type-safe-routing"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vick-ram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-27T20:56:14.000Z","updated_at":"2024-04-28T09:53:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"fed38916-089c-4a59-879e-6b5eec187657","html_url":"https://github.com/vick-ram/full-text-search","commit_stats":null,"previous_names":["vick-ram/full-text-search"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vick-ram/full-text-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vick-ram%2Ffull-text-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vick-ram%2Ffull-text-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vick-ram%2Ffull-text-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vick-ram%2Ffull-text-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vick-ram","download_url":"https://codeload.github.com/vick-ram/full-text-search/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vick-ram%2Ffull-text-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32503202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["dao","exposed","full-text-search","hikaricp","ktor","postgresql","type-safe-routing"],"created_at":"2024-12-05T10:14:05.387Z","updated_at":"2026-05-01T15:39:08.045Z","avatar_url":"https://github.com/vick-ram.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"**FULL-TEXT-SEARCH**\n- [x] [Full-Text Search](https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-SEARCH)\n- [x] [Full-Text Search Functions and Operators](https://www.postgresql.org/docs/current/functions-textsearch.html)\n\nThe full-text search feature allows you to efficiently search text stored in a PostgreSQL database. The feature includes the following:\n\n- Configurable text search configurations\n- Full-text indexing\n- Full-text search functions and operators\n- Full-text search queries\n\nThe full-text search feature is based on the following concepts:\n\n- **Document**: A piece of text to be searched.\n- **Lexeme**: A word that has been normalized to its base form. For example, the words \"jumping\", \"jumps\", and \"jumped\" are all normalized to the lexeme \"jump\".\n  - **Token**: A lexeme that is indexed for searching.\n  - **Stopword**: A common word that is ignored during full-text search. For example, \"the\" and \"is\" are stopwords.\n- **Parser**: A function that converts a document into a list of tokens.\n\nThe full-text search feature is useful for searching text in the following scenarios:\n\n- **Web search engines**: Search engines use full-text search to search for web pages that contain specific keywords.\n- **Document management systems**: Document management systems use full-text search to search for documents that contain specific keywords.\n- **E-commerce websites**: E-commerce websites use full-text search to search for products that contain specific keywords.\n- **Social media websites**: Social media websites use full-text search to search for posts that contain specific keywords.\n- **Chat applications**: Chat applications use full-text search to search for messages that contain specific keywords.\n\n**Technologies Used**\n\n- **PostgreSQL**: A powerful, open-source object-relational database system.\n- **pg_trgm**: A PostgreSQL extension that provides functions and operators for text similarity measurement and indexing.\n- **Ktor**: A Kotlin-based framework for building asynchronous web applications.\n- **Exposed**: A Kotlin SQL framework that provides a type-safe SQL API.\n- **HikariCP**: A high-performance JDBC connection pool.\n- **Kotlin Coroutines**: A Kotlin feature that allows you to write asynchronous code in a sequential style.\n\n**Features**\n\n- **Full-Text Indexing**: Indexes the text columns in the database to improve search performance.\n- **Full-Text Search**: Searches for text in the database using the full-text search feature.\n- **Text Similarity**: Measures the similarity between two text values using the pg_trgm extension.\n- **Asynchronous Web Application**: Uses Kotlin Coroutines to build an asynchronous web application.\n- **Type-Safe SQL API**: Uses Exposed to write type-safe SQL queries in Kotlin.\n- **Connection Pooling**: Uses HikariCP to manage JDBC connections efficiently.\n\n**Setup**\n\nTo set up the project, you need to have Kotlin and Java installed on your machine. You also need to set the following environment variables for the database connection:  \n- `URL`: The JDBC URL of your PostgreSQL database.\n- `USER`: The username for your PostgreSQL database.\n- `DB_PASSWORD`: The password for your PostgreSQL database.\n- `DRIVER`: The JDBC driver class name for your PostgreSQL database.\n\nOnce you have these set up, you can initialize the database by calling `DatabaseFactory.init()`. This will set up the connection pool, create the necessary tables and indices, and set up a trigger for updating the full-text search vector.\n\n**API Endpoints**\n\nThe project provides the following API endpoints:\n\n- `GET /api/v1/users`: Fetches users based on the provided query parameters. If an email is provided, it fetches the user with the matching email. If a search term is provided, it performs a search for users matching the term. If no parameters are provided, it fetches all users.  \n- `POST /api/v1/users`: Creates a new user. The request body should contain the details of the user to be created.  \n- `PUT /api/v1/users/{id}`: Updates the user with the provided ID. The request body should contain the updated details of the user.  \n- `DELETE /api/v1/users/{id}`: Deletes the user with the provided ID.\n\n**Running the Project**\n\nYou can run the project using the Gradle run task. This will start the server and make the API endpoints available for use.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvick-ram%2Ffull-text-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvick-ram%2Ffull-text-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvick-ram%2Ffull-text-search/lists"}