On 3/14/2016 8:31 AM, Adel Mohamed Khalifa wrote: > I build a website (Java EE ) and want to search in some json files so > I installed the solr server in an Ubuntu server and create a new core > then indexing json files and the web searched correctly when I moved > my code from windows to the server it stopped and cannot connect to > solr server I try to debug using netbeans in Ubuntu it’s stopped and > there is no exception on this statement (SolrServer server = new > HttpSolrServer(“localhost:8983/solr/SearchCore”) ). > > > > I need for some help Please. > > > > Note :- I attached the servlet I used to search and connect to solr > server. >
Don't set the "wt" or "indent" parameters. You won't be interacting with the actual text of the response -- all response access with SolrJ is through Java objects. Changing wt might just confuse SolrJ -- let it use its normal binary response format. The gson/json code you've got probably isn't going to do what you expect. If the "wt" parameter did not break the request (which might happen), then what you get with the getResults method on the response object will NOT be any standardized format like gson or json. You will need to access the SolrDocument object(s) from the SolrDocumentList, and then access fields from SolrDocument. Thanks, Shawn --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org