<commit_before>module ChefZero
  module Solr
    module Query
      class RangeQuery
        def initialize(from, to, from_inclusive, to_inclusive)
          @from = from
          @to = to
          @from_inclusive = from_inclusive
          @to_inclusive = to_inclusive
        end

        def to_s
          "#{@from_inclusive ? '[' : '{'}#{@from} TO #{@to}#{@to_inclusive ? '[' : '{'}"
        end

        def matches?(key, value)
          case @from <=> value
          when -1
            return false
          when 0
            return false if !@from_inclusive
          end
          case @to <=> value
          when 1
            return false
          when 0
            return false if !@to_inclusive
          end<commit_msg>fix up to_s end brackets<commit_after>module ChefZero
  module Solr
    module Query
      class RangeQuery
        def initialize(from, to, from_inclusive, to_inclusive)
          @from = from
          @to = to
          @from_inclusive = from_inclusive
          @to_inclusive = to_inclusive
        end

        def to_s
          "#{@from_inclusive ? '[' : '{'}#{@from} TO #{@to}#{@to_inclusive ? ']' : '}'}"
        end

        def matches?(key, value)
          case @from <=> value
          when -1
            return false
          when 0
            return false if !@from_inclusive
          end
          case @to <=> value
          when 1
            return false
          when 0
            return false if !@to_inclusive
          end
{'fraction_non_alphanumeric': 0.0895123580494322, 'fraction_numerical': 0.005344021376085505, 'mean_word_length': 1.4357723577235773, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5817223', 'n_tokens_mistral': 436, 'n_tokens_neox': 428, 'n_words': 123}