Class: Ferret::Index::FieldInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/ferret/index/field_infos.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, indexed, number, store_term_vector, store_position = false, store_offset = false) ⇒ FieldInfo

Returns a new instance of FieldInfo.



244
245
246
247
248
249
250
# File 'lib/ferret/index/field_infos.rb', line 244

def initialize(name, indexed, number, store_term_vector,
               store_position = false,
               store_offset = false)
  @name = name
  @number = number
  set!(indexed, store_term_vector, store_position, store_offset)
end

Instance Attribute Details

#indexed=(value) ⇒ Object (writeonly)

Sets the attribute indexed

Parameters:

  • value

    the value to set the attribute indexed to.



220
221
222
# File 'lib/ferret/index/field_infos.rb', line 220

def indexed=(value)
  @indexed = value
end

#nameObject

Returns the value of attribute name.



219
220
221
# File 'lib/ferret/index/field_infos.rb', line 219

def name
  @name
end

#numberObject

Returns the value of attribute number.



219
220
221
# File 'lib/ferret/index/field_infos.rb', line 219

def number
  @number
end

#store_offset=(value) ⇒ Object (writeonly)

Sets the attribute store_offset

Parameters:

  • value

    the value to set the attribute store_offset to.



220
221
222
# File 'lib/ferret/index/field_infos.rb', line 220

def store_offset=(value)
  @store_offset = value
end

#store_position=(value) ⇒ Object (writeonly)

Sets the attribute store_position

Parameters:

  • value

    the value to set the attribute store_position to.



220
221
222
# File 'lib/ferret/index/field_infos.rb', line 220

def store_position=(value)
  @store_position = value
end

#store_term_vector=(value) ⇒ Object (writeonly)

Sets the attribute store_term_vector

Parameters:

  • value

    the value to set the attribute store_term_vector to.



220
221
222
# File 'lib/ferret/index/field_infos.rb', line 220

def store_term_vector=(value)
  @store_term_vector = value
end

Instance Method Details

#indexed?Boolean

Returns:

  • (Boolean)


222
223
224
# File 'lib/ferret/index/field_infos.rb', line 222

def indexed?()
  return @indexed
end

#set!(indexed, store_term_vector, store_position, store_offset) ⇒ Object



237
238
239
240
241
242
# File 'lib/ferret/index/field_infos.rb', line 237

def set!(indexed, store_term_vector, store_position, store_offset)
  @indexed = indexed
  @store_term_vector = store_term_vector
  @store_position = store_position
  @store_offset = store_offset
end

#store_offsets?Boolean

Returns:

  • (Boolean)


230
231
232
# File 'lib/ferret/index/field_infos.rb', line 230

def store_offsets?()
  return @store_offset
end

#store_positions?Boolean

Returns:

  • (Boolean)


233
234
235
# File 'lib/ferret/index/field_infos.rb', line 233

def store_positions?()
  return @store_position
end

#store_term_vector?Boolean

Returns:

  • (Boolean)


226
227
228
# File 'lib/ferret/index/field_infos.rb', line 226

def store_term_vector?()
  return @store_term_vector
end