I have a little project that combines black light and Solr and need a) to boost a field b) to boost a document depending on a field value. I m reading SolrRelevancyFAQ and extendedDisMaxbut unable to apply them on the rails project because I m new on the framework/language . I know that there is a catalog.controller though , that pretty much has all solr configs. So for part a a guess I must somehow apply in my catalogue controller but have no idea how to implement it:
q=title:superman^2 subject:superman
or
ExtendedDisMax with qf=title^2 subject^2.8
For part 2 . I have no idea. Please help.
Edit , I managed (A) with the following code in catalogue_controller
config.default_solr_params = {
:qt => 'search',
:rows => 10,
:facet => 'true',
:qf => 'title^3 subject^2',
:defType =>'edismax'
}
For (b) I try to search for doc whose field canfly value is "yes" but it doesnt work. Any ideas?
config.default_solr_params = {
:qt => 'search',
:rows => 10,
:facet => 'true',
:bq => 'canfly:yes^50.0',
:defType =>'edismax'
}
According to solr documentationbq boosts the field whose value is the specified i.e
http://localhost:8983/solr/select/?q=video&defType=edismax&qf=features^20.0+text^0.3&bq=cat:electronics^5.0
but this doesnt work in when applied in the catalog controller. why is that ?
Solr.log (Here we can see the actual fields that exist label,description and source )
INFO - 2014-08-28 15:10:24.017; org.apache.solr.core.SolrCore; [raw_Geospatial_Collection] webapp=/solr path=/select params={facet=true&sort=time_created+desc&spellcheck.q=Pink&qf=label^20+description^2&f.tag.facet.mincount=1&wt=ruby&rows=10&defType=edismax&f.tag.facet.limit=6&bq=source:foursquare^50.0&q=Pink&facet.field={!ex%3Dtype_single}type&facet.field={!ex%3Dsource_single}source&facet.field={!ex%3Dcity_single}city&facet.field=tag&facet.field=gs_category_level2&qt=search&facet.pivot=gs_category_level1,gs_category_level2} hits=855 status=0 QTime=64