Skip to content

Conversation

Orbital-Web
Copy link
Contributor

Description

Fixed multiple row returned in get batch metadata, and made the query (number of docs) / (number of connectors) times faster (just the querying 😃 ).

How Has This Been Tested?

Locally

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)
  • [Optional] Override Linear Check

@Orbital-Web Orbital-Web requested a review from a team as a code owner June 27, 2025 17:23
Copy link

vercel bot commented Jun 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2025 5:25pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Optimized knowledge graph batch metadata querying by reducing unnecessary database joins and adding source filtering. This change makes document processing (number of docs)/(number of connectors) times faster.

  • Added connector_source parameter to _get_batch_documents_enhanced_metadata to filter results upfront
  • Removed redundant database joins per document for determining source type in get_batch_documents_metadata
  • Fixed issue with multiple rows being returned in batch metadata queries
  • Performance improvement achieved by passing source type directly instead of querying it repeatedly

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@joachim-danswer joachim-danswer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. Worked fine with two credentials for Fireflies.

@Orbital-Web Orbital-Web added this pull request to the merge queue Jun 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2025
@Orbital-Web Orbital-Web added this pull request to the merge queue Jun 27, 2025
@Orbital-Web Orbital-Web removed this pull request from the merge queue due to a manual request Jun 27, 2025
@Orbital-Web Orbital-Web merged commit 3180a13 into main Jun 27, 2025
13 of 15 checks passed
@Orbital-Web Orbital-Web deleted the kg-source-fix branch June 27, 2025 20:20
AnkitTukatek pushed a commit to TukaTek/onyx that referenced this pull request Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants