Module: SimpleSolrClient::Schema::Analysis
- Included in:
- FieldType
- Defined in:
- lib/simple_solr_client/schema/analysis.rb
Instance Method Summary collapse
- #index_input_valid?(val) ⇒ Boolean
-
#index_tokens(val) ⇒ Array
Get an array of tokens as analyzed/transformed at index time Note that you may have multiple values at each token position if you use a synonym filter or a stemmer.
-
#query_tokens(val) ⇒ Object
Get an array of tokens as analyzed/transformed at query time See #fieldtype_index_tokens.
Instance Method Details
#index_input_valid?(val) ⇒ Boolean
63 64 65 66 67 68 |
# File 'lib/simple_solr_client/schema/analysis.rb', line 63 def index_input_valid?(val) index_tokens(val) rescue SimpleSolrClient::Schema::InvalidTokenError, RuntimeError => e puts "IN HERE" require 'pry'; binding.pry end |
#index_tokens(val) ⇒ Array
Get an array of tokens as analyzed/transformed at index time Note that you may have multiple values at each token position if you use a synonym filter or a stemmer
58 59 60 |
# File 'lib/simple_solr_client/schema/analysis.rb', line 58 def index_tokens(val) fieldtype_tokens(val, 'index') end |
#query_tokens(val) ⇒ Object
Get an array of tokens as analyzed/transformed at query time See #fieldtype_index_tokens
73 74 75 |
# File 'lib/simple_solr_client/schema/analysis.rb', line 73 def query_tokens(val) fieldtype_tokens(val, 'query') end |