From 1480f854316d6903a70b01e69433d72bab5460b5 Mon Sep 17 00:00:00 2001 From: samkul-swe Date: Sat, 22 Nov 2025 12:16:30 -0800 Subject: [PATCH] Fixed indexing issue --- .../app/routes/search_source_connectors_routes.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/surfsense_backend/app/routes/search_source_connectors_routes.py b/surfsense_backend/app/routes/search_source_connectors_routes.py index 74080b065..2c8ae232f 100644 --- a/surfsense_backend/app/routes/search_source_connectors_routes.py +++ b/surfsense_backend/app/routes/search_source_connectors_routes.py @@ -483,6 +483,7 @@ async def index_connector_content( - DISCORD_CONNECTOR: Indexes messages from all accessible Discord channels - LUMA_CONNECTOR: Indexes events from Luma - ELASTICSEARCH_CONNECTOR: Indexes documents from Elasticsearch + - WEBCRAWLER_CONNECTOR: Indexes web pages from crawled websites Args: connector_id: ID of the connector to use @@ -689,6 +690,17 @@ async def index_connector_content( ) response_message = "Elasticsearch indexing started in the background." + elif connector.connector_type == SearchSourceConnectorType.WEBCRAWLER_CONNECTOR: + from app.tasks.celery_tasks.connector_tasks import index_webcrawler_urls_task + + logger.info( + f"Triggering web pages indexing for connector {connector_id} into search space {search_space_id} from {indexing_from} to {indexing_to}" + ) + index_webcrawler_urls_task.delay( + connector_id, search_space_id, str(user.id), indexing_from, indexing_to + ) + response_message = "Web page indexing started in the background." + else: raise HTTPException( status_code=400,