[ 
https://issues.apache.org/jira/browse/SOLR-17684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SOLR-17684:
----------------------------------
    Labels: guide monitor pingrequest pull-request-available reference solrj  
(was: guide monitor pingrequest reference solrj)

> Issue in SolrJ Reference Guide (Ping) - Incorrect Status Retrieval
> ------------------------------------------------------------------
>
>                 Key: SOLR-17684
>                 URL: https://issues.apache.org/jira/browse/SOLR-17684
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 9.8
>            Reporter: Umut Saribiyik
>            Priority: Minor
>              Labels: guide, monitor, pingrequest, pull-request-available, 
> reference, solrj
>         Attachments: image-2025-02-26-13-29-31-289.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The SolrJ Reference Guide provides incorrect examples for retrieving the ping 
> status of a collection.
> [https://solr.apache.org/guide/solr/9_8/deployment-guide/ping.html] 
> *Issues:*
>  # pingResponse.getStatus() returns the status of the ping request itself 
> (status=0), not the collection's ping status ("OK").
>  # Since getResponse() returns a NamedList<Object>, the value must be 
> explicitly cast to a String or converted using .toString().
>  
>  
> *Correction:*
> The correct way to retrieve the collection's ping status:
> {code:java}
> String status = (String) process.getResponse().get("status");  
> String status = process.getResponse().get("status").toString();  
> {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to