Lance, Thanks, want to put it up on the Wiki?
Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch ----- Original Message ---- > From: Lance Norskog <[EMAIL PROTECTED]> > To: solr-user@lucene.apache.org > Sent: Monday, June 9, 2008 1:12:35 PM > Subject: XSL scripting > > This started out in the num-docs thread, but deserves its own. And a wiki > page. > > There is a more complex and general way to get the number of documents in > the index. I run a query against solr and postprocess the output with an XSL > script. > > Install this xsl script as home/conf/xslt/numfound.xsl. > > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > > > > > > > Make sure 'curl' is installed, and add numfound.sh, a unix shell script. > > SHARD=localhost:8080/solr > QUERY="$1" > > LINK="http://$SHARD/select?indent=on&version=2.2&q=$QUERY&start=0&rows=0 > &fl=*&wt=xslt&tr=numfound.xsl" > curl --silent "$LINK" -H "Content-Type:text" -X GET > > Run it as > sh numfound.sh "*:*" > > How to install the XSLT script is to be found on the Wiki. > Star-colon-star is magic for 'all records'. > > > XSL is appalling garbage. > > Cheers!