{"id":30663391,"url":"https://github.com/simpsonresearch/redisearch","last_synced_at":"2026-04-20T05:08:00.277Z","repository":{"id":152123459,"uuid":"625374525","full_name":"simpsonresearch/RediSearch","owner":"simpsonresearch","description":"Redisearch for Golang and Python","archived":false,"fork":false,"pushed_at":"2023-04-09T17:13:42.000Z","size":679,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-31T17:17:14.020Z","etag":null,"topics":["cache","full-text-search","go","python","query","redis","redisearch"],"latest_commit_sha":null,"homepage":"","language":"Go","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/simpsonresearch.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":"2023-04-08T23:06:21.000Z","updated_at":"2023-04-09T17:06:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ec9d916-18fe-419d-b7e4-1cb119a0bbde","html_url":"https://github.com/simpsonresearch/RediSearch","commit_stats":null,"previous_names":["simpsonresearch/redisearch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/simpsonresearch/RediSearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simpsonresearch%2FRediSearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simpsonresearch%2FRediSearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simpsonresearch%2FRediSearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simpsonresearch%2FRediSearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simpsonresearch","download_url":"https://codeload.github.com/simpsonresearch/RediSearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simpsonresearch%2FRediSearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31929845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cache","full-text-search","go","python","query","redis","redisearch"],"created_at":"2025-08-31T17:10:50.279Z","updated_at":"2026-04-17T12:34:18.665Z","avatar_url":"https://github.com/simpsonresearch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redisearch\nRedisearch for Golang and Python\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/RediSearch/redisearch-go/redisearch\"\n\t\"github.com/go-redis/redis/v8\"\n)\n\n// Course struct\ntype Course struct {\n\tscore          float32\n\tdocId          string\n\tid             string\n\tname           string\n\ttitle          string\n\tdescription    string\n\tpre_requisites string\n\tcomponents     string\n\tunit           string\n}\n\nfunc main() {\n\tRedisAPISearch()\n\t// RediSearchAPI()\n\n\t// run the program: go run main.go\n}\n\n// InitSchema initializes the schema for insetring data into the redis db\nfunc InitSchema(client *redisearch.Client) {\n\tvar schema *redisearch.Schema = redisearch.NewSchema(redisearch.DefaultOptions).\n\t\tAddField(redisearch.NewTextField(\"components\")).\n\t\tAddField(redisearch.NewTextField(\"description\")).\n\t\tAddField(redisearch.NewTextField(\"id\")).\n\t\tAddField(redisearch.NewTextField(\"name\")).\n\t\tAddField(redisearch.NewTextField(\"pre_requisites\")).\n\t\tAddField(redisearch.NewTextField(\"title\")).\n\t\tAddField(redisearch.NewTextField(\"unit\"))\n\n\t// Create the index with the given schema\n\tif err := client.CreateIndex(schema); err != nil {\n\t\tfmt.Println(err)\n\t}\n}\n\n// Insert the course data into the redis db\nfunc (course Course) Insert(client *redisearch.Client) {\n\t// Create a new document that's going to be used to insert data into the db\n\tvar doc = redisearch.NewDocument(course.docId, course.score)\n\tdoc.Set(\"components\", course.components).\n\t\tSet(\"description\", course.description).\n\t\tSet(\"id\", course.id).\n\t\tSet(\"name\", course.name).\n\t\tSet(\"pre_requisites\", course.pre_requisites).\n\t\tSet(\"title\", course.title).\n\t\tSet(\"unit\", course.unit)\n\n\t// Update the database, insert the document\n\tif err := client.Index([]redisearch.Document{doc}...); err != nil {\n\t\tfmt.Println(err)\n\t}\n}\n\n// Perform a search using the redis/v8 package\nfunc RediSearchAPI() {\n\t// Create a client. By default a client is schemaless\n\t// unless a schema is provided when creating the index\n\tvar client *redisearch.Client = redisearch.NewClient(\"localhost:6379\", \"index\")\n\n\t// Track the start time\n\tvar startTime time.Time = time.Now()\n\n\t// Searching with limit and sorting\n\tvar docs, _, _ = client.Search(redisearch.NewQuery(\"math\").Limit(0, 600))\n\n\t// Print the first document id, title, total results and error\n\tfmt.Println(docs)\n\n\t// Print the time it took to run the query\n\t// The average time is about 60ms which is way slower than my uwaterloo.courses query method\n\tfmt.Println(time.Since(startTime))\n\n\t// run the program: go run main.go\n}\n\n// Redis API Search\nfunc RedisAPISearch() {\n\trdb := redis.NewClient(\u0026redis.Options{Addr: \"localhost:7501\"})\n\tctx := context.Background()\n\n\t// Track time\n\tvar startTime time.Time = time.Now()\n\n\t// Search for the term \"math\" and return the first 100 results\n\trdb.Do(ctx,\n\t\t\"FT.SEARCH\", \"courses\", \"math\",\n\t\t\"RETURN\", \"0\", \"LIMIT\", \"0\", \"100\",\n\t)\n\n\t// Print the time it took to run the query\n\tfmt.Println(time.Since(startTime))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimpsonresearch%2Fredisearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimpsonresearch%2Fredisearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimpsonresearch%2Fredisearch/lists"}