fix: Avoid vector search if query is not present in the params (#9265)

This commit is contained in:
Sojan Jose
2024-04-19 14:50:49 -07:00
committed by GitHub
parent d2e324b5fd
commit 60b355b500

View File

@@ -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