FIX: Error 500 from search with only filters (#304)

This commit is contained in:
Keegan George 2023-11-22 11:05:56 -08:00 committed by GitHub
parent 432590f8d9
commit 787cd1bf17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,8 @@ module DiscourseAi
search = Search.new(query, { guardian: guardian })
search_term = search.term
return [] if search_term.nil? || search_term.length < SiteSetting.min_search_term_length
strategy = DiscourseAi::Embeddings::Strategies::Truncation.new
vector_rep =
DiscourseAi::Embeddings::VectorRepresentations::Base.current_representation(strategy)