<commit_before>define (require) ->
  Backbone = require('backbone')

  SEARCH_URI = "#{location.protocol}//#{location.hostname}:6543/search"

  return class SearchResults extends Backbone.Model
    url: () -> "#{SEARCH_URI}#{@query}"

    defaults:
      query:
        limits: []
        sort: []
      results:
        items: []
        total: 0

    initialize: (options = {}) ->
      @query = options.query or ''
      @fetch()<commit_msg>Set loaded attr to true after fetching results<commit_after>define (require) ->
  Backbone = require('backbone')

  SEARCH_URI = "#{location.protocol}//#{location.hostname}:6543/search"

  return class SearchResults extends Backbone.Model
    url: () -> "#{SEARCH_URI}#{@query}"

    defaults:
      query:
        limits: []
        sort: []
      results:
        items: []
        total: 0

    initialize: (options = {}) ->
      @query = options.query or ''
      @fetch
        success: () => @set('loaded', true)
{'fraction_non_alphanumeric': 0.15680166147455868, 'fraction_numerical': 0.010384215991692628, 'mean_word_length': 2.5054545454545454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '1775315', 'n_tokens_mistral': 297, 'n_tokens_neox': 290, 'n_words': 63}