def put(needle, ref, weight = 0)
      check_valid_needle(needle)
      check_valid_ref(ref)
      raise(ArgumentError, "WEIGHT value must be in #{WEIGHT_RANGE}") unless WEIGHT_RANGE.include?(weight)

      cmd = ["PUT", @db_name, needle, ref, weight]
      send_cmd_and_get_results(cmd)
      return
    end
def put(needle, ref, weight = 0)
      check_valid_needle(needle)
      check_valid_ref(ref)
      raise(ArgumentError, "WEIGHT value must be in #{WEIGHT_RANGE}") unless WEIGHT_RANGE.include?(weight)

      cmd = ["PUT", @db_name, needle, ref, weight]
      send_cmd_and_get_results(cmd)
      return
    end
Index a given record.

 @param db_name The name of the data store being targeted. Required
 @param needle The string you wish to index. Must not contain tabs. Required
 @param ref The indentifying value of the record being indexed. Must be numeric. Required
 @param weight Weight of this particular reference. Default 0. Don't change unless you know what you're doing. Optional.

 Examples

 ```
 @client.put('location_en', 'London', 123, 0)
 # => OK
 ```

 @returns something to let you know that all is well.