External image caching

When doing searches or keyword suggestions with external images, the image is downloaded and a image descriptor is calculated on the fly. To speed up the process pixolution flow supports caching of calculated image descriptors for URLs that have been used by the Keyword Suggester or within query by URL queries. This way multiple downloads of the same images can be avoided.

To enable the external image URL cache you need to add the following two configuration parts to your solrconfig.xml. The first example needs to be placed within the query tag. We recommend to use the NoOpRegenerator to re-populate the cache with all available entries in case a new searcher is started and caches are invalidated. The second example is to inform the PixolutionComponent of the name of the previous configured cache. The name is provided as cache.name parameter value within the PixolutionComponent search component tag as shown below.

Configure a LRU cache within query tag:

<cache name="queryByUrlCache" class="solr.LRUCache" size="100" initialSize="50" autowarmCount="100%" regenerator="solr.NoOpRegenerator"/>

Inform the PixolutionComponent of the name of the previous configured cache:

<searchComponent name="pixolutionComponent" class="de.pixolution.solr.handler.component.PixolutionComponent">
  <str name="pixolution.parser">pixolutionParser</str>
  <str name="cache.name">queryByUrlCache</str>
</searchComponent>

Restart Solr for changes to take effect.