SyncController/SyncService/SyncProvider mirror the existing search dispatch pattern: a session-gated controller routes a SyncRequest to the provider registered for its ServiceType. HomeboxSyncProvider pages through the full Homebox catalog, embedding each page via EmbeddingService, and now collects every item ID it sees across all pages before pruning anything no longer present upstream in one deleteStaleVectorEntries call at the end - deleting per page would treat items on other pages as stale and wipe them out.
18 lines
555 B
Java
18 lines
555 B
Java
package com.vaessl.app.sync;
|
|
|
|
import com.vaessl.app.shared.ServiceProvider;
|
|
|
|
/**
|
|
* Implemented by any service that supports indexing its items into the vector store.
|
|
*/
|
|
public interface SyncProvider extends ServiceProvider {
|
|
|
|
/**
|
|
* Fetches all items from the remote service and indexes them into the vector store,
|
|
* removing any previously indexed items that no longer exist upstream.
|
|
*
|
|
* @param request the sync request containing the app URL and user credentials
|
|
*/
|
|
public void syncVectorStore(SyncRequest request);
|
|
}
|