lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Caching Solr boost functions?
Date Thu, 20 Feb 2014 21:52:37 GMT

: I'd like to tell Solr to cache those boost queries for the life of the
: Searcher so they don't get recomputed every time. Is there any way to do
: that out of the box?

if the functions never change, you could just index the computed value up 
front and save cycles at query time -- but that's the only option i can 
think of off the top of my head.

: In a different custom QParser we have we wrote a CachingValueSource that
: wrapped a ValueSource with a custom ValueSource cache. Would it make sense
: to implement that as a standard Solr function so that one could do:
: boost=cache(expensiveFunctionQuery())

Yeah... that could be handy.  Something like this perhaps?

  <cache name="some_cache_name"

  <valueSourceParser name="cache" class="solr.ValueSourceCachingParser">
    <str name="cacheName">some_cache_name</str>


View raw message