{"id":28480434,"url":"https://github.com/deloitteoptimalreality/redisearch.jl","last_synced_at":"2025-12-11T23:05:35.805Z","repository":{"id":40567631,"uuid":"456081639","full_name":"DeloitteOptimalReality/RediSearch.jl","owner":"DeloitteOptimalReality","description":"Julia Implemention of RediSearch API","archived":false,"fork":false,"pushed_at":"2022-09-29T01:11:42.000Z","size":154,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-21T12:10:06.333Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://deloitteoptimalreality.github.io/RediSearch.jl/dev/","language":"Julia","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/DeloitteOptimalReality.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}},"created_at":"2022-02-06T07:13:56.000Z","updated_at":"2023-03-13T06:38:02.000Z","dependencies_parsed_at":"2022-08-09T23:21:34.295Z","dependency_job_id":null,"html_url":"https://github.com/DeloitteOptimalReality/RediSearch.jl","commit_stats":null,"previous_names":["jacksoncalvert/redisearch.jl"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/DeloitteOptimalReality/RediSearch.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeloitteOptimalReality%2FRediSearch.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeloitteOptimalReality%2FRediSearch.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeloitteOptimalReality%2FRediSearch.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeloitteOptimalReality%2FRediSearch.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeloitteOptimalReality","download_url":"https://codeload.github.com/DeloitteOptimalReality/RediSearch.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeloitteOptimalReality%2FRediSearch.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263076489,"owners_count":23410076,"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":[],"created_at":"2025-06-07T19:06:24.676Z","updated_at":"2025-12-11T23:05:30.749Z","avatar_url":"https://github.com/DeloitteOptimalReality.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RediSearch.jl\n\n| **Docs** | **Build Status** |\n|:----:|:----------------------------------------------------------------------------------------------------------------------------------------------------------:|\n| [![docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://deloitteoptimalreality.github.io/RediSearch.jl/dev/) | ![Build](https://github.com/jacksoncalvert/RediSearch.jl/actions/workflows/ci.yml/badge.svg?branch=main) [![Codecov](https://codecov.io/gh/jacksoncalvert/RediSearch.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/jacksoncalvert/RediSearch.jl/) |\n\n\nA RediSearch API for Julia. This package uses **[Jedis.jl](https://github.com/captchanjack/Jedis.jl)** as a the Redis api to interact with a redis server. All additional features needed to use the secondary indexing module **[RediSearch](https://oss.redis.com/redisearch/)** can be found in this package\n\n\n## Usage \n### Generating a client\nGenerating a client object:\n```\njulia\u003e using RediSearch;\njulia\u003e client = SearchClient(\"myIdx\"; host=\"localhost\", port=6379);\n```\n\nThis client sets both the search client object for RediSearch and the Redis Global client in Jedis. a client can be retrieved at any time using:\n```\njulia\u003e get_search_client();\n```\n\nViewing the index name associated to a client:\n```\njulia\u003e client.index_name\n\"myIdx\"\n```\n\nwhile the base Jedis client can be viewd with:\n```\njulia\u003e client.client;\n```\n\n### Creating Fields\nFields define the searchable schema:\n```\njulia\u003e field_1 = TextField(\"name\"; weight=2);\njulia\u003e field_2 = NumericField(\"age\");\njulia\u003e field_3 = TextField(\"occupation\"; weight=1.5, as_name=\"job\");\njulia\u003e schema = [field_1, field_2, field_3]\n\n```\n\n### Creating an Index\nFields from above are used within an IndexDefintion to define a searchable schema within a RediSearch client.\n\nAn IndexDefinition should be made first to define the prefixes that will be indexed. \n```\njulia\u003e definition = IndexDefinition(prefix=[\"person:\"]);\n```\nWe can use this defition along with fields to create a searchable index:\n\n```\njulia\u003e create_index(schema; definition=definition);\n```\n\n### Adding Items to Index\n\nData is inserted into the RediSearch client by using the **[hset](https://captchanjack.github.io/Jedis.jl/commands/#Jedis.hset)** command. \n```\njulia\u003e using Jedis\njulia\u003e hset(\"person:1\", \"name\", \"James\", \"age\",26, \"occupation\", \"software\")\n3\n```\n\n**NOTE** This is for a schema using the HASH  index type. This differes when using the JSON index type.\n\n### Searching a Schema\nCreate a query and search:\n```\njulia\u003e q = Query(\"software\");\njulia\u003e results = search(q)\n[ Info: Result: 1 total\nRediSearch.Result(\n  1,\n  0.0018129348754882812,\n  RediSearch.Document[\n    RediSearch.Document(\n      \"person:1\",\n      nothing,\n      Dict{Any, Any}(\n        :age =\u003e \"26\",\n        :name =\u003e \"James\",\n        :occupation =\u003e \"software\"\n      )\n    )\n  ]\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeloitteoptimalreality%2Fredisearch.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeloitteoptimalreality%2Fredisearch.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeloitteoptimalreality%2Fredisearch.jl/lists"}