: 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"
         class="solr.LRUCache"
         size="4096"
         autowarmCount="1024"
         regenerator="solr.ValueSourceCacheRegenerator"
  />

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



-Hoss
http://www.lucidworks.com/

Reply via email to