{"id":50344571,"url":"https://github.com/timescale/cookbook-search","last_synced_at":"2026-05-29T19:01:40.203Z","repository":{"id":351605005,"uuid":"1211652781","full_name":"timescale/cookbook-search","owner":"timescale","description":"Cookbooks and resources about using search in postgres.","archived":false,"fork":false,"pushed_at":"2026-04-17T18:39:47.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-26T14:46:16.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timescale.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":"2026-04-15T15:57:34.000Z","updated_at":"2026-04-17T18:39:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/timescale/cookbook-search","commit_stats":null,"previous_names":["timescale/cookbook-search"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timescale/cookbook-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fcookbook-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fcookbook-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fcookbook-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fcookbook-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timescale","download_url":"https://codeload.github.com/timescale/cookbook-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timescale%2Fcookbook-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33666290,"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-05-29T02:00:06.066Z","response_time":107,"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-05-29T19:01:39.309Z","updated_at":"2026-05-29T19:01:40.194Z","avatar_url":"https://github.com/timescale.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tiger Data Search Cookbook\n\nA collection of cookbooks, tutorials, and reference implementations showcasing the different search capabilities available within **Tiger Data** and **PostgreSQL**.\n\n## What's Inside\n\nEach folder contains a self-contained cookbook focused on a specific search approach, complete with example queries, schema setup, and explanations of when and why you'd reach for that technique.\n\n| Cookbook | Description |\n|---------|-------------|\n| [Hybrid Search](./Hybrid-search/) | Combining BM25 keyword search with vector similarity search using pg_textsearch and pgvectorscale, fused with Reciprocal Rank Fusion (RRF) |\n\n## Who This Is For\n\n- Developers building search features on Tiger Data or PostgreSQL\n- Teams evaluating which search approach fits their use case\n- Anyone curious about what's possible with search in Postgres\n\n## Prerequisites\n\nBefore diving into any cookbook, make sure you have the following:\n\n- **PostgreSQL 17 or 18** — via [Tiger Cloud](https://console.cloud.timescale.com), [Docker](https://github.com/timescale/timescaledb-docker-ha), or a [local install](https://www.postgresql.org/download/)\n- **Docker** — required for local development without a manual PostgreSQL install. Get it at [docker.com/get-started](https://www.docker.com/get-started/)\n- **Tiger CLI** *(optional)* — manage Tiger Cloud services from the terminal or integrate with AI assistants via [Tiger MCP](https://www.tigerdata.com/docs/get-started/quickstart/mcp-cli). Install with `brew install --cask timescale/tap/tiger-cli` (macOS) or see the [CLI docs](https://www.tigerdata.com/docs/get-started/quickstart/cli-rest-api)\n- **Python 3.9+** — [python.org/downloads](https://www.python.org/downloads/)\n- **A Python package manager** — we use [uv](https://docs.astral.sh/uv/) in the tutorials, but [pip](https://pip.pypa.io/) and [conda](https://docs.conda.io/) work too\n- **An OpenAI API key** — for generating embeddings. Get one at [platform.openai.com/api-keys](https://platform.openai.com/api-keys)\n\n## Getting Started\n\n1. **Clone this repository**\n\n   ```bash\n   git clone https://github.com/tigerdatadev/cookbook-search.git\n   cd cookbook-search\n   ```\n\n2. **Set up your environment variables**\n\n   Each cookbook folder has its own `.env.example` file. Copy it and add your API key:\n\n   ```bash\n   cd Hybrid-search\n   cp .env.example .env\n   ```\n\n   Open `.env` and replace the placeholder with your actual OpenAI key:\n\n   ```\n   OPENAI_API_KEY=your-key-here\n   ```\n\n3. **Pick a cookbook and follow the tutorial**\n\n   Each cookbook folder has its own README with step-by-step instructions. Start with the [Hybrid Search](./Hybrid-search/) cookbook:\n\n   | File | What it does |\n   |------|-------------|\n   | [`Hybrid-search/README.md`](./Hybrid-search/README.md) | Full walkthrough — database setup, data loading, embeddings, search queries |\n   | [`Hybrid-search/setup.sql`](./Hybrid-search/setup.sql) | One-command setup: creates extensions, table, sample data, and indexes |\n   | [`Hybrid-search/embed.py`](./Hybrid-search/embed.py) | Generates embeddings for the sample data using OpenAI's API |\n   | [`Hybrid-search/requirements.txt`](./Hybrid-search/requirements.txt) | Python dependencies for the embedding script |\n   | [`Hybrid-search/.env.example`](./Hybrid-search/.env.example) | Template for your OpenAI API key — copy to `.env` and fill in |\n\n## Contributing\n\nHave a search pattern or technique you'd like to add? Open a PR! Each cookbook should include:\n\n- A `README.md` with a step-by-step tutorial explaining the approach\n- Example SQL or code demonstrating the technique\n- Sample data or a script to generate it\n- A `requirements.txt` if any Python dependencies are needed\n\n## License\n\nThis repository is licensed under the [Apache License 2.0](./LICENSE). Sample data in the Hybrid Search cookbook uses transcripts from the [Conduit podcast](https://www.relay.fm/conduit) via [kjaymiller/conduit-transcripts](https://github.com/kjaymiller/conduit-transcripts) (MIT License, Jay Miller).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimescale%2Fcookbook-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimescale%2Fcookbook-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimescale%2Fcookbook-search/lists"}