Add unique digest to Solr response header.
Java Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/de/fh_koeln/ixtrieve/srd
README.md
Rakefile

README.md

Implements a Solr XMLResponseWriter class that adds a unique digest (based on configuration key, number of results found, and current time in milliseconds) to the response header.

Build instructions

jrake DIR=path/to/lucene-solr

Configuration (solrconfig.xml)

<config>
  [...]
  <lib path="${solr.install.dir:../../../..}/de.fh_koeln.ixtrieve.srd.jar" />
  <queryResponseWriter name="xml" class="de.fh_koeln.ixtrieve.srd.XMLResponseWriter">
    <str name="key">KEY</str>
  </queryResponseWriter>
</config>

Result

<lst name="responseHeader">
  [...]
  <lst name="srd">
    <str name="key">KEY</str>
    <str name="value">1467375800940</str>
    <str name="digest">1c12a72548ab96c1aba506cbb0feb34652d382a39c1017b54e3125406e0bd7a5</str>
  </lst>
</lst>