Skip to content

Commit

Permalink
fixes per PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
DGaffney committed Aug 22, 2024
1 parent 1a6010f commit bf0a85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/explainer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def self.search_by_similarity(text, language, team_id)
language: language
}
}
response = Bot::Alegre.index_async_with_params(params, "text")
response = Bot::Alegre.get_async_with_params(params, "text")
results = response['result'].to_a.sort_by{ |result| result['_score'] }
explainer_ids = results.collect{ |result| result.dig('_source', 'context', 'explainer_id').to_i }.uniq.first(3)
explainer_ids.empty? ? Explainer.none : Explainer.where(team_id: team_id, id: explainer_ids)
Expand Down

0 comments on commit bf0a85d

Please sign in to comment.