Class: AdvancedQueryString
- Inherits:
-
Object
- Object
- AdvancedQueryString
- Defined in:
- backend/app/model/advanced_query_string.rb
Instance Method Summary collapse
-
#initialize(query, use_literal) ⇒ AdvancedQueryString
constructor
A new instance of AdvancedQueryString.
-
#to_solr_s ⇒ Object
Constructor Details
#initialize(query, use_literal) ⇒ AdvancedQueryString
Returns a new instance of AdvancedQueryString.
4 5 6 7 |
# File 'backend/app/model/advanced_query_string.rb', line 4 def initialize(query, use_literal) @query = query.transform_keys { |k| k.to_s } @use_literal = use_literal end |
Instance Method Details
#to_solr_s ⇒ Object
9 10 11 12 13 |
# File 'backend/app/model/advanced_query_string.rb', line 9 def to_solr_s return empty_solr_s if empty_search? "#{prefix}#{field}:#{value}" end |