From 60b355b5000d65d7e51d5a2bcf4e4ec4b8cecb1e Mon Sep 17 00:00:00 2001 From: Sojan Jose Date: Fri, 19 Apr 2024 14:50:49 -0700 Subject: [PATCH] fix: Avoid vector search if query is not present in the params (#9265) --- .../enterprise/public/api/v1/portals/articles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enterprise/app/controllers/enterprise/public/api/v1/portals/articles_controller.rb b/enterprise/app/controllers/enterprise/public/api/v1/portals/articles_controller.rb index ec305bfd1..240da0dca 100644 --- a/enterprise/app/controllers/enterprise/public/api/v1/portals/articles_controller.rb +++ b/enterprise/app/controllers/enterprise/public/api/v1/portals/articles_controller.rb @@ -3,7 +3,7 @@ module Enterprise::Public::Api::V1::Portals::ArticlesController def search_articles if @portal.account.feature_enabled?('help_center_embedding_search') - @articles = @articles.vector_search(list_params) if list_params.present? + @articles = @articles.vector_search(list_params) if list_params[:query].present? else super end