Hello!

If you implement SolrCoreAware interface in your custom
UpdateRequestProcessorFactory, you could then access your cache via Solr
Core in the inform method, I think. Haven't tried it myself, but it looks
logical to me to start from there.

// Dmitry

On Fri, Jun 29, 2012 at 4:44 PM, Iana Atanassova
<iana.atanass...@gmail.com>wrote:

> Hi,
>
> I'm trying to implement a custom UpdateRequestProcessorFactory class that
> works with the XSLT Request handler for indexing.
> My UpdateRequestProcessorFactory has to examine some of the document fields
> and compare them against some regular expressions that are stored in an
> external MySQL database.
> Currently, my UpdateRequestProcessorFactory works by establishing a
> connection to the database and them retrieving the regular expressions for
> every new document that needs to be indexed.
>
> However, I would like to speed up this processing and store the regular
> expressions in memory. I tried to define a new user cache in solrconfig.xml
> (http://wiki.apache.org/solr/SolrCaching#User.2BAC8-Generic_Caches). As
> far
> as I understand, these caches can be used to store any user application
> data. But when I implement the UpdateRequestProcessorFactory, I do not
> arrive to access this cache.
>
> What would be the method to read/write into a user defined sorl cache while
> indexing? How can I access the current SolrIndexSearcher from my code? Are
> there any other solutions that I should look at?
>
> Thanks!
>
> Iana
>



-- 
Regards,

Dmitry Kan

Reply via email to