Btw , the code is copied from solr 7.6 source code.

Thanks,
Rajeswari

On 7/24/19, 4:12 PM, "Natarajan, Rajeswari" <rajeswari.natara...@sap.com> 
wrote:

    Thanks Shawn for the reply. I am not saying it is bug. I just would like to 
know how to get the "lastTimestamp" by invoking CluodSolrClient reliabily.
    
    Regards,
    Rajeswari
    
    On 7/24/19, 3:14 PM, "Shawn Heisey" <apa...@elyograg.org> wrote:
    
        On 7/24/2019 3:50 PM, Natarajan, Rajeswari wrote:
        > Hi,
        > 
        > With the below API , the QueryResponse , sometimes have the 
"lastTimestamp" , sometimes not.
        > protected static QueryResponse getCdcrQueue(CloudSolrClient client) 
throws SolrServerException, IOException {
        >      ModifiableSolrParams params = new ModifiableSolrParams();
        >      params.set(CommonParams.QT, "/cdcr");
        >      params.set(CommonParams.ACTION, CdcrParams.QUEUES);
        >      return client.query(params);
        >    }
        
        Side note:  Setting the handler path with the qt parameter was 
        deprecated in Solr 3.6, which was released seven years ago.  I'm 
        surprised it even still works.
        
        Use a SolrQuery object instead of ModifiableSolrParams, and call its 
        setRequestHandler method to set the request handler.
        
        > Invoking 
http://<hostname>:<port>/solr/<collectionName>/cdcr?action=QUEUES  has the same 
issue
        > 
        > But if invoked as 
http://<hostname>:<port>/solr/<coreName>/cdcr?action=QUEUES always gets the " 
lastTimestamp" value. Would like to know
        > How to get the cdcr queues always return " lastTimestamp" value 
reliabily by CloudSolrClient.
        
        This part I really have no idea about.  The API documentation does say 
        that monitoring actions are done at the core level and control actions 
        are done at the collection level, so this might not be considered a 
bug. 
          Someone who knows CDCR really well will need to comment.
        
        https://lucene.apache.org/solr/guide/8_1/cdcr-api.html
        
        Thanks,
        Shawn
        
    
    

Reply via email to