Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix document counts #3671

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Fix document counts #3671

wants to merge 9 commits into from

Conversation

Weves
Copy link
Contributor

@Weves Weves commented Jan 14, 2025

Description

Addresses two edge cases:

  1. Permission syncing creating DocumentByConnectorCredentialPair objects before the indexing has occurred -> much larger count at the CC Pair level compared to the Index Attempt.
  2. Docs that are filtered out were still counted as part of the Index Attempt cnt but not part of the CC Pair count.

How Has This Been Tested?

Ran indexing locally, verified counts matched as expected.

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)

Copy link

vercel bot commented Jan 14, 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 Jan 16, 2025 5:54pm

@@ -263,21 +283,6 @@ def index_doc_batch_prepare(
def filter_documents(document_batch: list[Document]) -> list[Document]:
documents: list[Document] = []
for document in document_batch:
# Remove any NUL characters from title/semantic_id
Copy link
Contributor Author

@Weves Weves Jan 14, 2025

Choose a reason for hiding this comment

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

Removing this logic from this func and pushing it to strip_null_characters in run_indexing.py.

This isn't really a "filter" step, and the other function has this exact logic more-or-less, so it feels like it's a better fit there

@Weves Weves force-pushed the fix-document-counts branch from 2f14420 to 23ad230 Compare January 15, 2025 00:59
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