def index(*args, &block)
      case args.size
        when 1
          @indexed_methods_hash[args.first] = IndexOptions.new(:weight => 1, :block => block)
        when 2
          # Is it a method name with options?
          if args.last.is_a? Hash
            options = args.last
            assert_valid_keys options, :weight, :prefixed, :no_split
            @indexed_methods_hash[args.first] = IndexOptions.new(options.merge(:block => block))
          else
            add_indexes_from args
          end
        else # multiple arguments
          add_indexes_from args
      end
    end
def index(*args, &block)
      case args.size
        when 1
          @indexed_methods_hash[args.first] = IndexOptions.new(:weight => 1, :block => block)
        when 2
          # Is it a method name with options?
          if args.last.is_a? Hash
            options = args.last
            assert_valid_keys options, :weight, :prefixed, :no_split
            @indexed_methods_hash[args.first] = IndexOptions.new(options.merge(:block => block))
          else
            add_indexes_from args
          end
        else # multiple arguments
          add_indexes_from args
      end
    end
Add an indexed value to the blueprint. Indexed values are not accessible from a search result.
 @param [Array] args An array of arguments; you can pass a method name, an array of method names
   or a method name and an options hash.
 @param [Block] &block An optional block for complex configurations
 Avaliable options:
 - :weight (default: 1) The weight for this indexed value
 @example Simple index declaration
   blueprint.index :name
 @example Index declaration with options
   blueprint.index :name, :weight => 10
 @example Mass index declaration
   blueprint.index :name, :first_name, :profession
 @example Index declaration with a block
   blueprint.index :complex, :weight => 10 do
     # add some logic here to calculate the value for 'complex'
   end