Search is broken #2859

Closed
opened 2026-03-13 10:24:05 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @clicktodev on GitHub (Feb 11, 2026).

typing into the search box doesn't return anything.

devtools indicate the search endpoint is returning 500

Originally created by @clicktodev on GitHub (Feb 11, 2026). typing into the search box doesn't return anything. devtools indicate the search endpoint is returning 500
GiteaMirror added the bug label 2026-03-13 10:24:05 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Feb 11, 2026):

It looks like there is a known issue related to the search functionality where typing into the search box returns nothing due to an internal server error (500). This could be linked to a previous fix regarding the Drizzle adapter, which had issues with handling combined filter and search parameters correctly. Specifically, it could be due to how operators were handled for search queries [1], [2].

To troubleshoot this issue, consider the following steps:

  1. Check the server logs for any error messages corresponding to the 500 status code. This might give more insight into what's failing.
  2. Make sure your search parameters align with what the updated search function expects.
  3. If the issue persists, it might be useful to test with simpler search queries to see if certain parameters are causing the problem.

Feel free to tag @better-auth-agent for more specialized assistance on this issue! Is there anything specific you are trying to achieve with the search functionality?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Feb 11, 2026): It looks like there is a known issue related to the search functionality where typing into the search box returns nothing due to an internal server error (500). This could be linked to a previous fix regarding the Drizzle adapter, which had issues with handling combined filter and search parameters correctly. Specifically, it could be due to how operators were handled for search queries [[1]](), [[2]](https://github.com/better-auth/better-auth/pull/5319). To troubleshoot this issue, consider the following steps: 1. Check the server logs for any error messages corresponding to the 500 status code. This might give more insight into what's failing. 2. Make sure your search parameters align with what the updated search function expects. 3. If the issue persists, it might be useful to test with simpler search queries to see if certain parameters are causing the problem. Feel free to tag @better-auth-agent for more specialized assistance on this issue! Is there anything specific you are trying to achieve with the search functionality? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 11, 2026):

Hi @clicktodev! I'm Dosu and I’m helping the better-auth team.

The search endpoint returns a 500 error when there's a problem loading or indexing docs, often due to missing or misconfigured environment variables, or issues in the migration from Orama Cloud to Inkeep. Make sure all required environment variables for the current search provider are set correctly, and check that the migration is complete with no lingering references to the old provider (source). After updating configs, run a production build and reindex the search data (using docs/scripts/sync-orama.ts or the equivalent for Inkeep) to rebuild the index (source). If the error persists, review backend logs for stack traces—most 500s here are caused by loader/index errors or missing metadata in the docs source (source).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 11, 2026): <!-- Greeting --> Hi @clicktodev! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> The search endpoint returns a 500 error when there's a problem loading or indexing docs, often due to missing or misconfigured environment variables, or issues in the migration from Orama Cloud to Inkeep. Make sure all required environment variables for the current search provider are set correctly, and check that the migration is complete with no lingering references to the old provider ([source](https://github.com/better-auth/better-auth/pull/7101)). After updating configs, run a production build and reindex the search data (using docs/scripts/sync-orama.ts or the equivalent for Inkeep) to rebuild the index ([source](https://github.com/better-auth/better-auth/pull/6548)). If the error persists, review backend logs for stack traces—most 500s here are caused by loader/index errors or missing metadata in the docs source ([source](https://github.com/better-auth/better-auth/blob/0669ed804d8e0ada004c5ba266a6a12be6557cfc/docs/app/api/search/route.ts)). <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/9e9207c8-2062-41f6-86c2-d8c3a96a22bb?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20search%20endpoint%20returns%20a%20500%20error%20when%20there%27s%20a%20problem%20loading%20or%20indexing%20docs%2C%20often%20due%20to%20missing%20or%20misconfigured%20environment%20variables%2C%20or%20issues%20in%20the%20migration%20from%20Orama%20Cloud%20to%20Inkeep.%20Make%20sure%20all%20required%20environment%20variables%20for%20the%20current%20search%20provider%20are%20set%20correctly%2C%20and%20check%20that%20the%20migration%20is%20complete%20with%20no%20lingering%20references%20to%20the%20old%20provider%20%28%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/pull/7101%29%29.%20After%20updating%20configs%2C%20run%20a%20production%20build%20and%20reindex%20the%20search%20data%20%28using%20docs/scripts/sync-orama.ts%20or%20the%20equivalent%20for%20Inkeep%29%20to%20rebuild%20the%20index%20%28%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/pull/6548%29%29.%20If%20the%20error%20persists%2C%20review%20backend%20logs%20for%20stack%20traces%E2%80%94most%20500s%20here%20are%20caused%20by%20loader/index%20errors%20or%20missing%20metadata%20in%20the%20docs%20source%20%28%5Bsource%5D%28https%3A//github.com/better-auth/better-auth/blob/0669ed804d8e0ada004c5ba266a6a12be6557cfc/docs/app/api/search/route.ts%29%29.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/7924)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2859