[PR #7996] [MERGED] chore: index document even content is empty #8262

Closed
opened 2026-03-23 23:23:22 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7996
Author: @appflowy
Created: 5/27/2025
Status: Merged
Merged: 5/28/2025
Merged by: @appflowy

Base: mainHead: mobile_index


📝 Commits (1)

  • 19a2a3f chore: index document even content is empty

📊 Changes

15 files changed (+293 additions, -120 deletions)

View changed files

📝 frontend/rust-lib/Cargo.lock (+15 -14)
📝 frontend/rust-lib/collab-integrate/src/instant_indexed_data_provider.rs (+46 -48)
📝 frontend/rust-lib/event-integration-test/tests/search/document_title_content_search.rs (+89 -8)
📝 frontend/rust-lib/flowy-ai-pub/src/entities.rs (+1 -1)
📝 frontend/rust-lib/flowy-ai/Cargo.toml (+1 -1)
📝 frontend/rust-lib/flowy-ai/src/embeddings/scheduler.rs (+6 -2)
📝 frontend/rust-lib/flowy-core/Cargo.toml (+2 -1)
📝 frontend/rust-lib/flowy-core/src/full_indexed_data_provider.rs (+49 -29)
📝 frontend/rust-lib/flowy-core/src/indexed_data_consumer.rs (+24 -8)
📝 frontend/rust-lib/flowy-document/Cargo.toml (+1 -1)
📝 frontend/rust-lib/flowy-search-pub/src/tantivy_state.rs (+18 -0)
📝 frontend/rust-lib/flowy-search/src/document/cloud_search_handler.rs (+11 -4)
📝 frontend/rust-lib/flowy-search/src/event_handler.rs (+6 -0)
📝 frontend/rust-lib/flowy-search/src/services/manager.rs (+23 -2)
📝 frontend/rust-lib/lib-log/src/lib.rs (+1 -1)

📄 Description

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

Summary by Sourcery

Enable indexing of documents even when their content is empty and improve search indexing workflows across providers, consumers, and tests.

New Features:

  • Allow indexing and searching of documents with empty content by treating absent data as metadata-only entries.

Enhancements:

  • Refactor SearchManager to introduce perform_search_with_sink and handle empty queries early.
  • Increase full-indexing chunk size to 50 and parallelize consumer tasks using futures::future::join_all.
  • Update Instant and Full Indexed Data providers to emit Option and adapt consumers to handle None data.
  • Extend Tantivy state to accept optional content and index metadata-only documents.
  • Add CollectingSink abstraction in integration tests for capturing streaming search responses.

Build:

  • Bump futures and tracing-subscriber dependency versions in Cargo.toml

Tests:

  • Add search_with_empty_query_test to verify behavior when searching with an empty query.
  • Update document_title_content_search tests to use workspace-scoped perform_search_with_workspace and CollectingSink.

Chores:

  • Adjust ANSI log output to use platform.is_desktop in lib-log implementation.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/7996 **Author:** [@appflowy](https://github.com/appflowy) **Created:** 5/27/2025 **Status:** ✅ Merged **Merged:** 5/28/2025 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `mobile_index` --- ### 📝 Commits (1) - [`19a2a3f`](https://github.com/AppFlowy-IO/AppFlowy/commit/19a2a3fb29aa99d7223dbc3de3c4ff725305f7ab) chore: index document even content is empty ### 📊 Changes **15 files changed** (+293 additions, -120 deletions) <details> <summary>View changed files</summary> 📝 `frontend/rust-lib/Cargo.lock` (+15 -14) 📝 `frontend/rust-lib/collab-integrate/src/instant_indexed_data_provider.rs` (+46 -48) 📝 `frontend/rust-lib/event-integration-test/tests/search/document_title_content_search.rs` (+89 -8) 📝 `frontend/rust-lib/flowy-ai-pub/src/entities.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-ai/Cargo.toml` (+1 -1) 📝 `frontend/rust-lib/flowy-ai/src/embeddings/scheduler.rs` (+6 -2) 📝 `frontend/rust-lib/flowy-core/Cargo.toml` (+2 -1) 📝 `frontend/rust-lib/flowy-core/src/full_indexed_data_provider.rs` (+49 -29) 📝 `frontend/rust-lib/flowy-core/src/indexed_data_consumer.rs` (+24 -8) 📝 `frontend/rust-lib/flowy-document/Cargo.toml` (+1 -1) 📝 `frontend/rust-lib/flowy-search-pub/src/tantivy_state.rs` (+18 -0) 📝 `frontend/rust-lib/flowy-search/src/document/cloud_search_handler.rs` (+11 -4) 📝 `frontend/rust-lib/flowy-search/src/event_handler.rs` (+6 -0) 📝 `frontend/rust-lib/flowy-search/src/services/manager.rs` (+23 -2) 📝 `frontend/rust-lib/lib-log/src/lib.rs` (+1 -1) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. ## Summary by Sourcery Enable indexing of documents even when their content is empty and improve search indexing workflows across providers, consumers, and tests. New Features: - Allow indexing and searching of documents with empty content by treating absent data as metadata-only entries. Enhancements: - Refactor SearchManager to introduce perform_search_with_sink and handle empty queries early. - Increase full-indexing chunk size to 50 and parallelize consumer tasks using futures::future::join_all. - Update Instant and Full Indexed Data providers to emit Option<UnindexedData> and adapt consumers to handle None data. - Extend Tantivy state to accept optional content and index metadata-only documents. - Add CollectingSink abstraction in integration tests for capturing streaming search responses. Build: - Bump futures and tracing-subscriber dependency versions in Cargo.toml Tests: - Add search_with_empty_query_test to verify behavior when searching with an empty query. - Update document_title_content_search tests to use workspace-scoped perform_search_with_workspace and CollectingSink. Chores: - Adjust ANSI log output to use platform.is_desktop in lib-log implementation. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:23:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#8262
No description provided.