<commit_before>(ns ikea-clojure-cup.ikea
  (:require [compojure.api.sweet :refer :all]
            [ring.util.http-response :refer :all]))


(defroutes* ikea-routes
  (GET* "/regions" []
        (ok [{:name "Australia"
              :code "au"}]))
  (GET* "/search" []
        (ok [{:name "Test 1"
              :url "/something/454543/"
              :image "/something/45254325/small.jpg"}
             {:name "Test 2"
              :url "/something/454544/"
              :image "/something/452544/small.jpg"}])))
<commit_msg>wire in search function<commit_after>(ns ikea-clojure-cup.ikea
  (:require [compojure.api.sweet :refer :all]
            [schema.core :as s]
            [ring.util.http-response :refer :all]
            [ikea-clojure-cup.search :as search]))


(defroutes* ikea-routes
  (GET* "/regions" []
        (ok [{:name "Australia"
              :code "au"}]))
  (GET* "/search" []
        :query-params [query :- s/Str]
        (ok (search/search "au" query))))

{'fraction_non_alphanumeric': 0.17922606924643583, 'fraction_numerical': 0.028513238289205704, 'mean_word_length': 2.0527950310559007, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1765071', 'n_tokens_mistral': 366, 'n_tokens_neox': 343, 'n_words': 71}