You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Adel Mohamed Khalifa <a....@saudisoft.com> on 2016/03/14 15:31:25 UTC

Solr in Linux Platform

Hello everybody,

 

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.

 

Regards,
Adel Khalifa

 


RE: Solr in Linux Platform

Posted by Adel Mohamed Khalifa <a....@saudisoft.com>.
I do that with the hostname ( “ 172.16.0.**:8983/solr/SearchCore “ ) and still the problem exist

 

Regards,
Adel Khalifa

 

From: Walter Underwood [mailto:wunder@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
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)

 

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

 


Re: Solr in Linux Platform

Posted by Walter Underwood <wu...@wunderwood.org>.
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
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


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


Re: Solr in Linux Platform

Posted by Shawn Heisey <ap...@elyograg.org>.
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Solr in Linux Platform

Posted by Ishan Chattopadhyaya <ic...@gmail.com>.
Hi Abdel,
I think asking in the solr-users mailing list would be more appropriate. In
this mailing list, we discuss development related issues.
Hope your problem is solved soon,
Regards,
Ishan

On Mon, Mar 14, 2016 at 8:01 PM, Adel Mohamed Khalifa <
a.mohamed@saudisoft.com> wrote:

> Hello everybody,
>
>
>
> 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.
>
>
>
>
> *Regards,**Adel Khalifa*
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>