Use the hostname of the Ubuntu server instead of “localhost”. This URL will 
only connect to the same host where your client is running: 
localhost:8983/solr/SearchCore

wunder
Walter Underwood
[email protected]
http://observer.wunderwood.org/  (my blog)


> On Mar 14, 2016, at 8:12 AM, Shawn Heisey <[email protected]> wrote:
> 
> 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: [email protected]
> For additional commands, e-mail: [email protected]
> 

Reply via email to