{"id":50715018,"url":"https://github.com/samdvr/json_index","last_synced_at":"2026-06-09T18:31:24.643Z","repository":{"id":288365250,"uuid":"967791680","full_name":"samdvr/json_index","owner":"samdvr","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-05T22:47:57.000Z","size":23,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T23:28:56.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/samdvr.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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-17T02:27:29.000Z","updated_at":"2025-06-05T22:47:59.000Z","dependencies_parsed_at":"2025-04-17T17:21:57.536Z","dependency_job_id":"cb64f32b-b56b-4c50-ac5c-fba8b9aec0d5","html_url":"https://github.com/samdvr/json_index","commit_stats":null,"previous_names":["samdvr/json_index"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samdvr/json_index","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fjson_index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fjson_index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fjson_index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fjson_index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samdvr","download_url":"https://codeload.github.com/samdvr/json_index/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samdvr%2Fjson_index/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34121021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":[],"created_at":"2026-06-09T18:31:23.837Z","updated_at":"2026-06-09T18:31:24.638Z","avatar_url":"https://github.com/samdvr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonIndex\n\nA simple document indexing and querying library built on top of Fjall, providing JSON document storage with flattened key-value indexing for efficient queries.\n\n## Features\n\n- **Document Storage**: Store JSON documents with unique IDs\n- **Automatic Indexing**: Automatically flattens and indexes JSON documents for fast retrieval\n- **Simple Querying**: Query documents using flattened key-value patterns\n- **Complex Queries**: Perform complex AND/OR queries across multiple conditions\n- **Document Management**: Add, query, and delete documents with ease\n\n## Usage\n\n```rust\nuse jsonindex::JsonIndexDB;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    // Open database\n    let keyspace = fjall::Config::new(\"db_data\").open()?;\n    let json_index = JsonIndexDB::new(keyspace)?;\n\n    // Index a document\n    let doc = r#\"{\"name\": \"John Doe\", \"age\": 30, \"address\": {\"city\": \"Anytown\"}}\"#;\n    let doc_id = \"unique-id-123\";\n    json_index.index_document(doc, doc_id)?;\n\n    // Simple query\n    let results = json_index.query(\"name=John Doe\")?;\n    for (id, doc) in results {\n        println!(\"Found document: {}\", doc);\n    }\n\n    // Complex query (AND operation)\n    let results = json_index.complex_query(\u0026[\n        \"name=John Doe\",\n        \"age=30\",\n    ], QueryLogic::And)?;\n\n    // Complex query (OR operation)\n    let results = json_index.complex_query(\u0026[\n        \"address.city=Anytown\",\n        \"address.city=Springfield\",\n    ], QueryLogic::Or)?;\n\n    // Delete a document\n    json_index.delete_document(doc_id)?;\n\n    Ok(())\n}\n```\n\n## How It Works\n\nJsonIndex flattens nested JSON documents into key-value pairs with paths representing the hierarchy. For example:\n\n```json\n{\n  \"name\": \"John\",\n  \"address\": {\n    \"city\": \"Anytown\"\n  }\n}\n```\n\nGets indexed as:\n\n- `name=John`\n- `address.city=Anytown`\n\nEach indexed key-value pair points to a list of document IDs that contain that key-value pair, enabling efficient lookups.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdvr%2Fjson_index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamdvr%2Fjson_index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamdvr%2Fjson_index/lists"}