diff --git a/plugins/other/solr-stats b/plugins/other/solr-stats new file mode 100755 index 00000000..9c3d84a6 --- /dev/null +++ b/plugins/other/solr-stats @@ -0,0 +1,59 @@ +#!/usr/bin/php +load($file); + + $xpath = new DOMXpath($doc); + + $elements = $xpath->query('/solr/solr-info/' . $category . '/entry'); + + foreach($elements as $element) + { + if($item == trim($element->getElementsByTagName('name')->item(0)->textContent)) + { + $stats = $element->getElementsByTagName('stat'); + + foreach($stats as $stat) + { + if($property == trim($stat->getAttribute('name'))) + { + echo $core . $item . $property . 'solr.value ' . floatval(trim($stat->textContent)) . "\n"; + } + } + } + } +} +