Skip to content

Commit

Permalink
Debugging for search
Browse files Browse the repository at this point in the history
  • Loading branch information
cguess committed Apr 1, 2024
1 parent 1ba89fd commit 60f4e9d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/models/image_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def raw_sql(dhash)
end

sql = "SELECT archive_item_id, levenshtein FROM ( #{inner_query} LIMIT 20 ) t ORDER BY levenshtein;"
sql.split("\n").map(&:strip).join(" ")
sql = sql.split("\n").map(&:strip).join(" ")

if Rails.env.production? && Figaro.AUTH_BASE_HOST == "staging.factcheckinsights.org"
Rails.logger.debug(sql)
end

sql
end
end

0 comments on commit 60f4e9d

Please sign in to comment.