Solr Indexing error in this function. I am using Windows 8 x32, Xampp to
configure solr, tomcat. I have tried many other forums too but not helpful.
Even tried configuring many XML in Xampp/solr still could not get it
working. Any hints would be helpful. Here is my function for solr indexing
and the imports

import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
import org.apache.solr.client.solrj.request.ContentStreamUpdateRequest;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.client.solrj.request.AbstractUpdateRequest;
import org.apache.solr.client.solrj.SolrQuery;
`

public void GeoTagIndexToSolr(File f,String Latitude,String Longitude){
    try {
        String urlString = "http://localhost:8080/solr";; 
        SolrServer server = new CommonsHttpSolrServer(urlString);
        ContentStreamUpdateRequest up = new
ContentStreamUpdateRequest("/update/extract");
        String fileName=f.toString();
        up.addFile(new File(fileName));
        up.setParam("Latitude", Latitude);
        up.setParam("Longitude", Longitude);
        up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
        server.request(up);
        } catch (SolrServerException e) {
            System.out.println("SolrServerException: "+e+"
");e.printStackTrace();
        } catch (MalformedURLException e) {
            System.out.println("MalformedURLException: "+e+"
");e.printStackTrace();
        } catch (IOException e) {
            System.out.println("IOException: "+e+" ");e.printStackTrace();
        }               
}

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Indexing-error-in-this-function-tp3929446p3929446.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to