{"id":34501769,"url":"https://github.com/roimenashe/aerospike-search","last_synced_at":"2026-04-19T22:03:44.494Z","repository":{"id":329556164,"uuid":"1094505777","full_name":"roimenashe/aerospike-search","owner":"roimenashe","description":"In-memory embedded full-text \u0026 vector search for Aerospike, powered by Apache Lucene","archived":false,"fork":false,"pushed_at":"2026-02-09T09:56:51.000Z","size":305,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-09T14:50:36.229Z","etag":null,"topics":["aerospike","database","full-text-search","hybrid-search","java","lucene","search","search-engine","vector"],"latest_commit_sha":null,"homepage":"","language":"Java","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/roimenashe.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T19:53:08.000Z","updated_at":"2026-02-09T09:56:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/roimenashe/aerospike-search","commit_stats":null,"previous_names":["roimenashe/aerospike-search"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/roimenashe/aerospike-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roimenashe%2Faerospike-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roimenashe%2Faerospike-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roimenashe%2Faerospike-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roimenashe%2Faerospike-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roimenashe","download_url":"https://codeload.github.com/roimenashe/aerospike-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roimenashe%2Faerospike-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32024251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"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":["aerospike","database","full-text-search","hybrid-search","java","lucene","search","search-engine","vector"],"created_at":"2025-12-24T02:04:12.861Z","updated_at":"2026-04-19T22:03:44.489Z","avatar_url":"https://github.com/roimenashe.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aerospike Search\n\n[![Build and Test](https://github.com/roimenashe/aerospike-search/actions/workflows/build.yml/badge.svg)](https://github.com/roimenashe/aerospike-search/actions/workflows/build.yml)\n\nIn-memory embedded full-text and vector search for [Aerospike](https://aerospike.com/), built on [Apache Lucene](https://github.com/apache/lucene), enabling fast keyword and semantic queries through a simple Java API.\n\n## Features\n\n- **Full-Text Search** - Index and search text fields using Lucene's powerful text analysis\n- **Vector Search** - K-nearest neighbor (KNN) search with customizable similarity functions\n- **Hybrid Search** - Combine full-text and vector search with configurable weights\n- **Zero Infrastructure** - Runs embedded in your application, no external services required\n- **Simple API** - Get started with just a few lines of code\n\n## Requirements\n\n- Java 21+\n- Aerospike Server (running locally or remotely)\n- Maven or Gradle\n\n## Installation\n\nClone and install to your local Maven repository:\n\n```bash\ngit clone https://github.com/roimenashe/aerospike-search.git\ncd aerospike-search\nmvn clean install\n```\n\nThen add the dependency to your project's `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.roimenashe\u003c/groupId\u003e\n    \u003cartifactId\u003eaerospike-search\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Quick Start\n\n### Full-Text Search\n\nIndex all text bins and search by keyword:\n\n```java\ntry (AerospikeSearch search = new AerospikeSearch(aerospikeClient)) {\n    // Index all string bins in the set\n    search.createFullTextIndex(\"namespace\", \"products\");\n    \n    // Search for records containing \"laptop\"\n    List\u003cRecord\u003e results = search.searchText(\"namespace\", \"products\", \"laptop\", 10);\n}\n```\n\nIndex specific bins only:\n\n```java\nsearch.createFullTextIndex(\"namespace\", \"products\", \"title\", \"description\");\n```\n\n### Vector Search\n\n#### From an existing vector bin\n\n```java\ntry (AerospikeSearch search = new AerospikeSearch(aerospikeClient)) {\n    // Index vectors stored in the \"embedding\" bin\n    search.createVectorIndex(\"namespace\", \"products\", \"embedding\", SimilarityFunction.COSINE);\n    \n    // Find 10 nearest neighbors\n    float[] queryVector = new float[]{0.1f, 0.8f, 0.3f};\n    List\u003cRecord\u003e results = search.searchVector(\"namespace\", \"products\", queryVector, 10, SimilarityFunction.COSINE);\n}\n```\n\n#### Using a custom embedding function\n\nGenerate embeddings on-the-fly during indexing:\n\n```java\ntry (AerospikeSearch search = new AerospikeSearch(aerospikeClient)) {\n    // Create vectors using a custom embedding function\n    search.createVectorIndex(\"namespace\", \"products\", record -\u003e {\n        String description = record.getString(\"description\");\n        return myEmbeddingModel.embed(description);  // Your embedding logic\n    }, SimilarityFunction.DOT_PRODUCT);\n    \n    float[] queryVector = myEmbeddingModel.embed(\"wireless headphones\");\n    List\u003cRecord\u003e results = search.searchVector(\"namespace\", \"products\", queryVector, 10, SimilarityFunction.DOT_PRODUCT);\n}\n```\n\n### Hybrid Search\n\nCombine keyword matching with semantic similarity:\n\n```java\ntry (AerospikeSearch search = new AerospikeSearch(aerospikeClient)) {\n    // Build both indexes\n    search.createFullTextIndex(\"namespace\", \"products\");\n    search.createVectorIndex(\"namespace\", \"products\", \"embedding\", SimilarityFunction.COSINE);\n    \n    // Hybrid search: 60% text relevance, 40% vector similarity\n    float[] queryVector = myEmbeddingModel.embed(\"comfortable office chair\");\n    List\u003cRecord\u003e results = search.searchHybrid(\n        \"namespace\", \"products\",\n        \"ergonomic chair\",           // text query\n        queryVector,                 // vector query\n        SimilarityFunction.COSINE,\n        10,                          // limit\n        0.6,                         // text weight\n        0.4                          // vector weight\n    );\n}\n```\n\n## Limitations\n\n- **In-memory only** - Indexes are stored in JVM heap memory and are not persisted to disk\n- **No real-time updates** - Changes to Aerospike data require rebuilding the index to be reflected in search results\n- **Single-node** - Indexes are local to the JVM instance and not distributed across nodes\n\nFor large-scale or distributed search use cases, consider using the\n[Aerospike Elasticsearch Connector](https://aerospike.com/docs/connectors/elasticsearch/), which provides scalable\nintegration with [Elasticsearch](https://www.elastic.co/elasticsearch) for enterprise-grade indexing and querying.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froimenashe%2Faerospike-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froimenashe%2Faerospike-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froimenashe%2Faerospike-search/lists"}