Okay, I've committed the fix for
CODEBASE-231 to let you, use
dollar-sign style LocalParams in your blacklight search_field config.
For instance:
Blacklight.search_fields << { :display_label => "Author",
:key=>"author",
:local_solr_parameters => { :qf => "$author_qf" }
}
Which Blacklight will wind up translating to solr query including:
(uri-escaped, but showing non-escaped for clarity)
&q={!qf=$author_qf} actual user query
You'd use that where in your solrconfig for the request handler
involved, you had defined:
<str name="author_qf">
someField10
otherField5
</str>
This makes possible more options in your Solr/Blacklight setup.
Even before this patch, you could use just ONE solr request handler, but
specify per-blacklight-field solr params with :solr_parameters -- but
they'd have to be literal solr values, so "someField10 otherField5"
would be defined in Blacklight, and sent with every Solr request.
Now, with :local_solr_parameters, you can use just one solr request
handler, but have the per-search-field configuration in Solr, and have
Blacklight just send the LocalParams variable-dereference-style
"$author_qf".
It seems to me that perhaps I should change the default/example Solr
that comes with Blacklight to use this newly possible style? I think
it's probably more useful/powerful example than what's there now, which
uses a separate Solr request handler per blacklight "search field".
Agree? If so, if someone gives me commit access to the blacklight-solr
sub-project, I'll do that.
CODEBASE-231to let you, usedollar-sign style LocalParams in your blacklight search_field config.
For instance:
Blacklight.search_fields << { :display_label => "Author",
:key=>"author",
:local_solr_parameters => { :qf => "$author_qf" }
}
Which Blacklight will wind up translating to solr query including:
(uri-escaped, but showing non-escaped for clarity)
&q={!qf=$author_qf} actual user query
You'd use that where in your solrconfig for the request handler
involved, you had defined:
<str name="author_qf">
someField10
otherField5
</str>
This makes possible more options in your Solr/Blacklight setup.
Even before this patch, you could use just ONE solr request handler, but
specify per-blacklight-field solr params with :solr_parameters -- but
they'd have to be literal solr values, so "someField10 otherField5"
would be defined in Blacklight, and sent with every Solr request.
Now, with :local_solr_parameters, you can use just one solr request
handler, but have the per-search-field configuration in Solr, and have
Blacklight just send the LocalParams variable-dereference-style
"$author_qf".
It seems to me that perhaps I should change the default/example Solr
that comes with Blacklight to use this newly possible style? I think
it's probably more useful/powerful example than what's there now, which
uses a separate Solr request handler per blacklight "search field".
Agree? If so, if someone gives me commit access to the blacklight-solr
sub-project, I'll do that.
CODEBASE-231to let you, use dollar-sign style LocalParams in your blacklight search_field config. For instance: Blacklight.search_fields << { :display_label => "Author", :key=>"author", :local_solr_parameters => { :qf => "$author_qf" } } Which Blacklight will wind up translating to solr query including: (uri-escaped, but showing non-escaped for clarity) &q={!qf=$author_qf} actual user query You'd use that where in your solrconfig for the request handler involved, you had defined: <str name="author_qf"> someField10 otherField5 </str> This makes possible more options in your Solr/Blacklight setup. Even before this patch, you could use just ONE solr request handler, but specify per-blacklight-field solr params with :solr_parameters -- but they'd have to be literal solr values, so "someField10 otherField5" would be defined in Blacklight, and sent with every Solr request. Now, with :local_solr_parameters, you can use just one solr request handler, but have the per-search-field configuration in Solr, and have Blacklight just send the LocalParams variable-dereference-style "$author_qf". It seems to me that perhaps I should change the default/example Solr that comes with Blacklight to use this newly possible style? I think it's probably more useful/powerful example than what's there now, which uses a separate Solr request handler per blacklight "search field". Agree? If so, if someone gives me commit access to the blacklight-solr sub-project, I'll do that.