<commit_before>Spree::Sunspot::Setup.filters do |filters|
  # Maximum value would be ignored if the range maximum is set to
  # Spree::Sunspot::Setup::IGNORE_MAX
  filters.add do |f|
    f.search_param = 'price'
    f.display_name = 'Price'
    f.values { [0..10, 10..20, 20..30, 30..Spree::Sunspot::Setup::IGNORE_MAX] }
  end

  # Additional examples
  # filters.add do |f|
  #   f.search_param = 'category_name'
  #   f.display_name = 'Category'
  #   f.values { Spree::Taxon.find_by_permalink('categories').children.map(&:name) }
  # end
  #
  # filters.add do |f|
  #   f.search_param = 'brand_name'
  #   f.display_name = 'Brand'
  #   f.values { Spree::Taxon.find_by_permalink('brands').children.map(&:name) }
  # end
end<commit_msg>document the filters a little<commit_after>Spree::Sunspot::Setup.filters do |filters|

  # Ranges can be Dates, Ints, or Floats
  # filters.add do |f|
  #   f.search_param = 'price'
  #   # Can be :any (||) or :all (&&)
  #   f.search_condition = :any
  #   f.display_name = 'Price'
  #   f.values { [0..10, 10..20, 20..30] }
  # end

  # Pre load at runtime or specify items for restrictions
  # filters.add do |f|
  #   f.search_param = 'category_name'
  #   f.search_condition = :any
  #   f.display_name = 'Category'
  #   f.values { Spree::Taxon.find_by_permalink('categories').children.map(&:name) }
  # end

  # Empty arrays eager load facets specified here
  # filters.add do |f|
  #   f.search_param = 'brand_name'
  #   f.search_condition = :any
  #   f.display_name = 'Brand'
  #   f.values { [] }
  # end

end
{'fraction_non_alphanumeric': 0.15256410256410258, 'fraction_numerical': 0.015384615384615385, 'mean_word_length': 3.1737967914438503, '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': '2897817', 'n_tokens_mistral': 615, 'n_tokens_neox': 587, 'n_words': 124}