You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by solr nps <so...@gmail.com> on 2011/08/02 06:34:33 UTC
return meta information with every search
we have a fairly complex taxonomy in our search system. I want to store the
taxonomy revision that was used to built the Solr index. This revision
number is not specific to a document but it is specific to the entire index.
I want this revision number to be returned as part of every search.
What is the best way to implement this without duplicating the revision
number for every document.
Thanks for your help.
Re: return meta information with every search
Posted by Chris Hostetter <ho...@fucit.org>.
: we have a fairly complex taxonomy in our search system. I want to store the
: taxonomy revision that was used to built the Solr index. This revision
based on your wording, it sounds like this is an index that you don't ever
update incrementally, and just rebuild and deploy completlye new indexes
periodically .. is that correct?
If that's the case, one very low tech solution would to update your
an "invariant" param on your requestHandlers everytime you build a new
version of the index -- the specific name of the param could be whatever
you want, solr won't care about it, but then using echoParams=all it would
be echoed back to the client.
A slightly higher-tech way would be to write yourselve a trivial little
SearchComponent that could read the taxonomyId from some where on
startup (a txt file in the data dir perhaps) and then add it directly to
the response.
-Hoss