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 nikhil500 <ni...@yahoo.com> on 2009/03/05 11:05:05 UTC

Admin stats using SolrJ

Hi,

I use Solr 1.3 through SolrJ.  I want to access the statistics which are
displayed at /admin/ in the default Solr install.  Is there some way of
getting those statistics through SolrJ.  I tried
query.setQueryType("admin"); in code and renamed the "/admin/"
requesthandler in solrconfig.xml to just "admin" but it does not seem to
work.  (Says " org.apache.solr.common.SolrException: The AdminHandler needs
to be registered to a path.  Typically this is '/admin' ")

Any tips?

Thanks,
Nikhil

-- 
View this message in context: http://www.nabble.com/Admin-stats-using-SolrJ-tp22348609p22348609.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Admin stats using SolrJ

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Mar 5, 2009 at 3:35 PM, nikhil500 <ni...@yahoo.com> wrote:

>
> Hi,
>
> I use Solr 1.3 through SolrJ.  I want to access the statistics which are
> displayed at /admin/ in the default Solr install.  Is there some way of
> getting those statistics through SolrJ.  I tried
> query.setQueryType("admin"); in code and renamed the "/admin/"
> requesthandler in solrconfig.xml to just "admin" but it does not seem to
> work.  (Says " org.apache.solr.common.SolrException: The AdminHandler needs
> to be registered to a path.  Typically this is '/admin' ")
>

Using setQueryType should work, however I have not tried it.

The other problem is that even if Solrj fetches the response of /admin, it
does not understand the format of the response XML. You'll be left with a
NamedList data structure which you'd need to understand and use yourself.
-- 
Regards,
Shalin Shekhar Mangar.