I think that I should use HttpSolrServer for such kind of purposes. It
would be nice to do it within CloudSolrServer if somebody send a
LukeRequest it would be nice CloudSolrServer collects distributed metrics.
i.e. num of docs, max docs within all shards etc. Last modification date
should be the latest date of all shards at given collection etc. Version
may be removed for Distributed Luke Request.

If it is welcome I can create a Jira and send a patch for it.


2013/6/10 Furkan KAMACI <furkankam...@gmail.com>

> I have two shards. One of them has 46 documents other one has 42.  My
> default core name is collection1.
>
> When I select a node from first shard I see that:
>
> Last Modified:about a minute ago
> Num Docs:42
> Max Doc:42
> Deleted Docs:0
> Version:27
> Segment Count:1
>
> When I select a node from second shard I see that:
>
> Last Modified:2 minutes ago
> Num Docs:46
> Max Doc:46
> Deleted Docs:0
> Version:11
> Segment Count:1
>
> I want to see total number of documents at my cloud. I have written that
> lines of codes:
>
> public int getMaxDocs(CloudSolrServer solrServer){
>      NamedList<Object> namedList = null;
>      try {
>            namedList = solrServer.request(new LukeRequest());
>       } catch (SolrServerException e) {
>            e.printStackTrace();
>       } catch (IOException e) {
>           e.printStackTrace();
>      }
>     return (int) ((NamedList<Object>)
> namedList.get("index")).get("numDocs");
> }
>
> However I get 46 as result. I think that CloudSolrServer load balances
> request and hits seconds shard. However how can I get distributed cluster
> statistics? On the other hand isn't it logically wrong letting people to
> use CloudSolrServer and LukeRequest together?
>

Reply via email to