I am currently running a Solr client/server pair which is working fine.
However, in some cases the filter query (fq
parameter) which is sent to Solr is quite large (can be thousands of characters) and can not be trimmed down. As the query parsing takes only a fraction of the overall time, I want to experiment with zipping this query part and sending it to Solr.
I was thinking of modifying the client so instead of fq
it uses another parameter (e.g. zfq
). Solr can then decide - if it receives zfq
, it uses it and decodes the data into fq
. Otherwise it should behave as usual.
What is the standard way to achieve the above? Looks like there is SearchHandler
, requestHandler
, <queryParser
(both in solrconfig.xml) and many others and I'm not quite sure what's least intrusive. I'm fairly confident with Lucene/Tomcat but don't know much about Solr data structures.
You can make your Solr container take extremely long urls: Tomcat here, Jetty here.
If the fq
s have some default values, you can create a query parser that includes it by default.
<requestHandler name="for_some_queries" class="solr.SearchHandler" default="true">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<str name="fq">MY VERY LONG FQ</str>
</lst>
</requestHandler>
But I agree with Mauricio Scheffer for a better design.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With