Module: Solrizer::DefaultDescriptors
- Defined in:
- lib/solrizer/default_descriptors.rb
Class Method Summary collapse
-
.dateable ⇒ Object
Takes fields which are stored as strings, but we want indexed as dates.
-
.displayable ⇒ Object
Produces _ssm suffix.
-
.facetable ⇒ Object
Produces _sim suffix.
-
.searchable ⇒ Object
The suffix produced depends on the type parameter – produces suffixes: _teim - for strings or text fields _dtim - for dates _iim - for integers.
- .simple ⇒ Object
-
.sortable ⇒ Object
The suffix produced depends on the type parameter – produces suffixes: _tei - for text fields _si - for strings _dti - for dates _ii - for integers.
-
.stored_searchable ⇒ Object
The suffix produced depends on the type parameter – produces suffixes: _tesim - for strings or text fields _dtsim - for dates _isim - for integers.
-
.stored_sortable ⇒ Object
Fields that are both stored and sortable Produces _ssi suffix if field_type is string Produces _dtsi suffix if field_type is date.
-
.symbol ⇒ Object
Produces _ssim suffix This is useful for when you only want to match whole words, such as user/group names from the the rightsMetadata datastream.
-
.unstemmed_searchable ⇒ Object
Produces _tim suffix (used to be _unstem).
Class Method Details
.dateable ⇒ Object
Takes fields which are stored as strings, but we want indexed as dates. (e.g. “November 6th, 2012”) produces suffixes:
_dtsim - for dates
23 24 25 |
# File 'lib/solrizer/default_descriptors.rb', line 23 def self.dateable @dateable ||= Descriptor.new(:date, :stored, :indexed, :multivalued, converter: dateable_converter) end |
.displayable ⇒ Object
Produces _ssm suffix
55 56 57 |
# File 'lib/solrizer/default_descriptors.rb', line 55 def self.displayable @displayable ||= Descriptor.new(:string, :stored, :multivalued) end |
.facetable ⇒ Object
Produces _sim suffix
28 29 30 |
# File 'lib/solrizer/default_descriptors.rb', line 28 def self.facetable @facetable ||= Descriptor.new(:string, :indexed, :multivalued) end |
.searchable ⇒ Object
The suffix produced depends on the type parameter – produces suffixes:
_teim - for strings or text fields
_dtim - for dates
_iim - for integers
16 17 18 |
# File 'lib/solrizer/default_descriptors.rb', line 16 def self.searchable @searchable ||= Descriptor.new(searchable_field_definition, converter: searchable_converter, requires_type: true) end |
.simple ⇒ Object
64 65 66 |
# File 'lib/solrizer/default_descriptors.rb', line 64 def self.simple @simple ||= Descriptor.new(lambda {|field_type| [field_type, :indexed]}) end |
.sortable ⇒ Object
The suffix produced depends on the type parameter – produces suffixes:
_tei - for text fields
_si - for strings
_dti - for dates
_ii - for integers
43 44 45 |
# File 'lib/solrizer/default_descriptors.rb', line 43 def self.sortable @sortable ||= Descriptor.new(sortable_field_definition, converter: searchable_converter, requires_type: true) end |
.stored_searchable ⇒ Object
The suffix produced depends on the type parameter – produces suffixes:
_tesim - for strings or text fields
_dtsim - for dates
_isim - for integers
8 9 10 |
# File 'lib/solrizer/default_descriptors.rb', line 8 def self.stored_searchable @stored_searchable ||= Descriptor.new(stored_searchable_field_definition, converter: searchable_converter, requires_type: true) end |
.stored_sortable ⇒ Object
Fields that are both stored and sortable Produces _ssi suffix if field_type is string Produces _dtsi suffix if field_type is date
50 51 52 |
# File 'lib/solrizer/default_descriptors.rb', line 50 def self.stored_sortable @stored_sortable ||= Descriptor.new(lambda {|field_type| [field_type, :stored, :indexed]}, converter: searchable_converter) end |
.symbol ⇒ Object
Produces _ssim suffix This is useful for when you only want to match whole words, such as user/group names from the the rightsMetadata datastream
34 35 36 |
# File 'lib/solrizer/default_descriptors.rb', line 34 def self.symbol @symbol ||= Descriptor.new(:string, :stored, :indexed, :multivalued) end |
.unstemmed_searchable ⇒ Object
Produces _tim suffix (used to be _unstem)
60 61 62 |
# File 'lib/solrizer/default_descriptors.rb', line 60 def self.unstemmed_searchable @unstemmed_searchable ||= Descriptor.new(:text, :indexed, :multivalued) end |