Module: CqlRuby

Defined in:
lib/blacklight_cql/blacklight_to_solr.rb

Overview

Patch CqlRuby to provide a #to_bl_solr implementation, which is like to_solr, but aware of Blacklight search_field defintions for dismax relation queries.

The relation “solr.dismax” is used to mean that the value string is a query in the solr dismax query parsing language.

CQL indexes can refer to direct solr fields, or Blacklight-defined dismax search_fields, specified by CQL prefix. By default, “lsolr” means a local solr field, and “local” means a blacklight search_field. Indexes specified with no index will use a blacklight search_field if one exists, otherwise assumed to be solr field.

“Context set” prefixed used to identify bl and solr fields can be changed in CqlRuby.to_solr_defaults, keys solr_field_prefix, blacklight_field_prefix.

argument to #to_bl_solr is a ‘config’ object that duck-types to Blacklight::SearchFields , for accessing search fields config.