AnsweredAssumed Answered

Changing Default SOLR Search Boost in Share

Question asked by neilecker on Oct 16, 2016
Latest reply on Oct 25, 2016 by neilecker

Any idea how I can boost the query score for a specific property in the default Share search?  I'd like to make a match in a document name score higher in the search results than a match in the document title.

 

I thought I could do it by editing the solrconfig.xml but it doesn't appear to do anything (I tried just reloading the config and also doing a complete re-index).  Below is a section of the solrconfig.xml for the workspace store with the default qf commented out and my modified qf below that where I've increased the boost for name and reduced it for title.

 

/opt/alfresco/solr4/workspace-SpacesStore/conf/solrconfig.xml

<requestHandler name="/browse" class="solr.SearchHandler">
...
       <!-- Query settings -->
       <str name="defType">edismax</str>
       <!--<str name="qf">
          text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
          title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
       </str>-->
       <str name="qf">
          text^0.5 features^1.0 name^5.0 sku^1.5 id^10.0 manu^1.1 cat^1.4
          title^1.0 description^2.0 keywords^5.0 author^2.0 resourcename^1.0
       </str>
...
</requestHandler>


 

My test consisted of creating one file with the word "Test" in the name and another with the word "Test" in the title.  Regardless of how I change the solrconfig.xml the document with "Test" in the title field would always come up first when doing a search in Share for "Test" which leads me to believe that this is the not the correct location to try and change this.

 

Thanks,

Neil

Outcomes