I do that with the hostname ( “ 172.16.0.**:8983/solr/SearchCore “ ) and still 
the problem exist

 

Regards,
Adel Khalifa

 

From: Walter Underwood [mailto:wun...@wunderwood.org] 
Sent: Monday, March 14, 2016 5:36 PM
To: dev@lucene.apache.org
Subject: Re: Solr in Linux Platform

 

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
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)

 

On Mar 14, 2016, at 8:12 AM, Shawn Heisey <apa...@elyograg.org> 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

 

Reply via email to