On 5/20/2013 5:53 AM, J Mohamed Zahoor wrote:
> How do i disable cache (Solr FieldValueCache) for certain queries...
> using HTTP it can be done using {!cache=false}... 

If you are doing facets, Koji's reply works for those.

The localparam for caching should work just fine if you prepend it to
your query string before you add it to your query object in SolrJ.

query.addFilterQuery("{!cache=false}instock:true");

If this is what you have tried, be sure that you don't use
ClientUtils.escapeQueryChars to escape the prepended localparam, or it
will become part of your query text rather than the special cache
instruction.  You can run it on the query parts, of course.

If it still doesn't work, check the Solr log for what parameters get
sent with the http query and with the solrj query.

Thanks,
Shawn

Reply via email to