feat(docs): added vector search#2583
Merged
waleedlatif1 merged 2 commits intostagingfrom Dec 25, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryReplaced fumadocs client-side search with a hybrid vector + keyword search system using PostgreSQL and OpenAI embeddings. Vector search (cosine similarity with pgvector) is enabled for English queries, while all languages get keyword search using PostgreSQL full-text search with locale-specific text search configurations. Results are interleaved to combine semantic and lexical matching. Key Changes:
Notes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant SearchAPI as GET /api/search
participant OpenAI as OpenAI API
participant DB as PostgreSQL
Client->>SearchAPI: "GET ?query=...&locale=...&limit=10"
alt Empty query
SearchAPI->>Client: "Empty array"
end
SearchAPI->>SearchAPI: "Parse params"
SearchAPI->>SearchAPI: "Compute tsConfig from locale"
alt locale is en
SearchAPI->>OpenAI: "POST /v1/embeddings"
OpenAI->>SearchAPI: "embedding vector (1536 dims)"
SearchAPI->>DB: "Vector search (cosine similarity)"
DB->>SearchAPI: "vectorResults"
end
SearchAPI->>DB: "Keyword search (ts_rank)"
DB->>SearchAPI: "keywordResults"
SearchAPI->>SearchAPI: "Interleave & deduplicate"
SearchAPI->>SearchAPI: "Map to format"
SearchAPI->>Client: "JSON search results"
|
Collaborator
Author
|
@greptile |
a4ca7f2 to
14f6648
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of Change
Testing
Tested manually
Checklist