Step back a bit here.

Did you manage to get Solr itself running on Android? I thought that
supposed to be not feasible!

You code seems to imply that you have, because you are connecting to localhost.

Alternatively - and more reasonably - if you have Solr running on the
server in the cloud, you need to provide THAT server's address instead
of localhost.

Regards,
   Alex.
Personal website: http://www.outerthoughts.com/
Current project: http://www.solr-start.com/ - Accelerating your Solr proficiency


On Mon, May 5, 2014 at 7:22 AM, blach <stag...@gmail.com> wrote:
> Hello all.
>
> I'm trying to make a small search engine based on android. when I'm calling
> solr by this
> "http://localhost:8983/solr/collection1/select?q="+loginValue+"&wt=json&indent=true";;
> (loginValue is the keywork im looking for)
>
> Its always giving me a fail message this is the code:
>
>  try{
>
>             // URLEncode user defined data
>
>               String loginValue    =
> URLEncoder.encode(etxt1.getText().toString(), "UTF-8");
>
>           // Create http client object to send request to server
>
>               HttpClient Client = new DefaultHttpClient();
>
>
>            String URL =
> "http://localhost:8983/solr/collection1/select?q="+loginValue+"&wt=json&indent=true";;
>
>
>           try
>            {
>                          String SetServerString = "";
>
>                        // Create Request to server and get response
>                         HttpGet httpget = new HttpGet(URL);
>                         ResponseHandler<String> responseHandler = new
> BasicResponseHandler();
>                         SetServerString = Client.execute(httpget,
> responseHandler);
>
>                          // Show response on activity
>
>                         etxt2.setText(SetServerString);
>
>
>
>             }}
>           catch(Exception ex)
>              {
>                   etxt2.setText("Fail!");
>               }
>        }
>      catch(UnsupportedEncodingException ex)
>       {
>          etxt2.setText("Fail11111");
>        }
>    }
>
>
>
>
>
> any suggestion
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/can-t-make-GET-request-to-solr-in-android-app-tp4134584.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to