feat(native): native reader for indexer (#14055)

This commit is contained in:
DarkSky
2025-12-07 16:22:11 +08:00
committed by GitHub
parent 69cdeedc4e
commit cf4e37c584
28 changed files with 1376 additions and 569 deletions
@@ -3,6 +3,7 @@ pub mod blob_sync;
pub mod doc;
pub mod doc_sync;
pub mod error;
pub mod indexer;
pub mod pool;
pub mod storage;
@@ -117,6 +118,20 @@ impl DocStoragePool {
Ok(())
}
#[napi]
pub async fn crawl_doc_data(
&self,
universal_id: String,
doc_id: String,
) -> Result<indexer::NativeCrawlResult> {
let result = self
.get(universal_id)
.await?
.crawl_doc_data(&doc_id)
.await?;
Ok(result)
}
#[napi]
pub async fn set_space_id(&self, universal_id: String, space_id: String) -> Result<()> {
self.get(universal_id).await?.set_space_id(space_id).await?;