-
Notifications
You must be signed in to change notification settings - Fork 0
Solrizer Reference
E. Lynette Rayle edited this page Mar 6, 2022
·
2 revisions
Reference: Blacklight's schema.xml (see dynamicFields and fieldTypes)
Extensions based on data type and how the field will be indexed...
data type → | text | English text | string | integer | date time | boolean | comments |
---|---|---|---|---|---|---|---|
↓field parameters | _t... | _te... | _s... | _i... | _dt... | _b... | |
indexed only (...i) | _ti | _tei | _si | _ii | _dti | _bi | field WILL be searched, but will NOT be part of retrieved solr document |
indexed & multi-valued (...im) | _tim | _teim | _sim | _iim | _dtim | _bim | |
stored only (...s) | _ts | _tes | _ss | _is | _dts | _bs | field will NOT be searched, but WILL be part of retrieved solr document |
stored & multi-valued (...sm) | _tsm | _tesm | _ssm | _ism | _dtsm | _bsm | |
stored & indexed (...si) | _tsi | _tesi | _ssi | _isi | _dtsi | _bsi | field WILL be searched and WILL be part of retrieved solr document |
stored, indexed, & multi-valued (...sim) | _tsim | _tesim | _ssim | _isim | _dtsim | _bsim |
Meaning of field parameters
- indexed - field will be searched
- stored - field will part of retrieved solr document
- multi-valued - field is an array of values
See also:
- additional
<dynamicField>
definitions and a few additional field parameters defined in Blacklight Solr schema.xml -
<fieldType>
definitions which configure types used in dynamic fields with base solr types
Extensions based on symbol passed to Solrizer (see examples after the table).
data type → | date | time | text_en | string | symbol | integer | boolean |
---|---|---|---|---|---|---|---|
↓indexed as | |||||||
none | _dtsim | _dtsim | _tesim | _tesim | _ssim | _isim | _bsi |
:stored_searchable | _dtsim | _dtsim | _tesim | _tesim | _ssim | _isim | _bsi |
:searchable | _dtim | _dtsim | _teim | _teim | _sim | _iim | _bim |
:dateable | _dtsim | _dtsim | _dtsim | _dtsim | _dtsim | _dtsim | _dtsim |
:facetable | _sim | _sim | _sim | _sim | _sim | _sim | _sim |
:symbol | _ssim | _ssim | _ssim | _ssim | _ssim | _ssim | _ssim |
:sortable | _dti | _dti | _tei | _si | _si | _ii | _bi |
:stored_sortable | _dtsi | _dtsi | _tesi | _ssi | _ssi | _isi | _bsi |
:displayable | _ssm | _ssm | _ssm | _ssm | _ssm | _ssm | _ssm |
:unstemmed_searchable | _tim | _tim | _tim | _tim | _tim | _tim | _tim |
:simple | _dti | _dti | _tei | _si | _si | _ii | _bi |
fm.solr_name('foo', :facetable, :type=>:text ) # pass one modifier at a time
=> "foo_sim"
fm.solr_name('foo', :facetable, :type=>:string )
=> "foo_sim"
fm.solr_name('foo', :facetable, :type=>:integer )
=> "foo_sim"
fm.solr_name('foo', :searchable, type: :text )
=> "foo_teim"
fm.solr_name('foo', :searchable, type: :string )
=> "foo_teim"
fm.solr_name('foo', :searchable, type: :integer )
=> "foo_iim"
fm.solr_name('foo', :searchable, type: :float )
Solrizer::InvalidIndexDescriptor: Invalid datatype `:float'. Must be one of: :date, :time, :text, :text_en, :string, :symbol, :integer, :boolean
fm.solr_name('foo' )
=> "foo_tesim"
fm.solr_name('foo', :stored_searchable)
=> "foo_tesim"
fm.solr_name('foo', :searchable)
=> "foo_teim"
fm.solr_name('foo', :dateable)
=> "foo_dtsim"
fm.solr_name('foo', :facetable)
=> "foo_sim"
fm.solr_name('foo', :symbol)
=> "foo_ssim"
fm.solr_name('foo', :sortable )
=> "foo_si"
fm.solr_name('foo', :stored_sortable)
=> "foo_ssi"
fm.solr_name('foo', :displayable)
=> "foo_ssm"
fm.solr_name('foo', :unstemmed_searchable)
=> "foo_tim"
fm.solr_name('foo', :simple)
=> "foo_si"