cancel
Showing results for 
Search instead for 
Did you mean: 

How to change requesthandler for solr search ( /Query instead of /select) in hybris 5.5

Former Member
0 Kudos

Hi All

The existing search query is using the /select request handler and hence every search query is computed rather using the queryresultcache. Changing the query type to /query will benefit from the query result cache value.

Please let suggest me if anyone have any idea how to change it.

Thanks, Satya

Accepted Solutions (0)

Answers (1)

Answers (1)

radek_michalczyk
Explorer
0 Kudos

Hi,

I thnik this part is hardcoded to change it probably class has to be extended and configuration in spring has to be adjusted. Before doing it can you double check this cache usage with /select?

By checking version of Solr delievered with 6.3 I can see in solrconfig.xml this:

 enter code here <requestHandler name="/query" class="solr.SearchHandler">
      <lst name="defaults">
        <str name="echoParams">explicit</str>
        <str name="wt">json</str>
        <str name="indent">true</str>
        <str name="df">text</str>
      </lst>
   </requestHandler>
   
   
   <requestHandler name="/select" class="solr.SearchHandler">
      <lst name="defaults">
        <str name="echoParams">explicit</str>
        <int name="rows">10</int>
         <str name="spellcheck.onlyMorePopular">true</str>
        <bool name="preferLocalShards">false</bool>
      </lst>
      <arr name="last-components">
        <str>spellcheck</str>
      </arr>
     </requestHandler>

There are some differences but none of them is related with cache usage as far as I can see.

You can check if cache is used or not by going to Solr admin page (example URL): http://localhost:8983/solr/#/master_electronics_Product_flip/plugins?type=cache&entry=queryResultCac...

If cache is not used for /select in your case maybe it is better to do change in solrconfig. xml not on Hybris side?

Greeting,

Radek