lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linbin Chen (JIRA)" <>
Subject [jira] Issue Comment Edited: (SOLR-1197) memcached implement solr cache for queryresultCache
Date Wed, 03 Jun 2009 09:44:07 GMT


Linbin Chen edited comment on SOLR-1197 at 6/3/09 2:42 AM:

patch for Solr 1.3 

this patch only DocSetBase  implement Serializable



MemcachedCache instead of solr queryresultCache (default LRUCache)

config in solrconfig.xml to use solr-memcache

add newSearcher and firstSearcher Listener, such as:

<listener event="newSearcher" class="solr.MemcachedCache" />
<listener event="firstSearcher" class="solr.MemcachedCache" />

use listener only for get index version, to create memcached key

indexVersion is static long field of

//originalKey is QueryResultKey
memcached key = keyPrefix+indexVersion+"-"+originalKey.hashCode() 


MemcachedCache params:

memcachedHosts (required), "," split.
name (optional) no default.
expTime (optional) default 1800 s (= 30 minute)
defaultPort (optional) default 11211
keyPrefix (optional) default ""




dep jar:


solr-memcache.patch for solr 1.3

if download and unzip to d:/apache-solr-1.3.0

copy patch-build.xml and solr-memcache.patch to (d:/apache-solr-1.3.0)

D:\apache-solr-1.3.0>ant -f patch-build.xml -Dpatch.file=solr-memcache.patch
Buildfile: patch-build.xml

    [patch] patching file src/java/org/apache/solr/search/

Total time: 0 seconds

if exist d:/apache-solr-1.3.0/contrib/solr-memcache, if no exist you can unzip
to that dir

and dist

D:\apache-solr-1.3.0>ant dist

look D:\apache-solr-1.3.0\dist\apache-solr-memcache-1.3.0.jar

      was (Author: chenlb):
    patch for Solr 1.3 

this patch only DocSetBase  implement Serializable
> memcached implement solr cache for queryresultCache 
> ----------------------------------------------------
>                 Key: SOLR-1197
>                 URL:
>             Project: Solr
>          Issue Type: New Feature
>    Affects Versions: 1.3
>         Environment: multiple slave solr replication environment
>            Reporter: Linbin Chen
>             Fix For: 1.4
>         Attachments: SOLR_1197-solr-memcache.patch
> multiple slave create query result together, and slaves can share that.
> implement  memcached cache instead LRUCache
> my implement:
> object transport by net need Serializable, so need patch solr 1.3, DocSetBase implements
Serializable, see

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message