Class: XapianDb::DocumentBlueprint::IndexOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/xapian_db/document_blueprint.rb

Overview

Options for an indexed method

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ IndexOptions

Constructor

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :weight (Integer) — default: 1

    The weight for the indexed value


448
449
450
451
452
453
# File 'lib/xapian_db/document_blueprint.rb', line 448

def initialize(options = {})
  @weight   = options[:weight] || 1
  @prefixed = options[:prefixed].nil? ? true : options[:prefixed]
  @no_split = options[:no_split]
  @block    = options[:block]
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block


443
444
445
# File 'lib/xapian_db/document_blueprint.rb', line 443

def block
  @block
end

#no_splitObject (readonly)

Returns the value of attribute no_split


443
444
445
# File 'lib/xapian_db/document_blueprint.rb', line 443

def no_split
  @no_split
end

#prefixedObject (readonly)

Returns the value of attribute prefixed


443
444
445
# File 'lib/xapian_db/document_blueprint.rb', line 443

def prefixed
  @prefixed
end

#weightObject (readonly)

Returns the value of attribute weight


443
444
445
# File 'lib/xapian_db/document_blueprint.rb', line 443

def weight
  @weight
end