I finally did myself and used the *C# class HttpClient* to make the web
request for the Solr API URL as follows.


  string solrTargetDIHUrl =
"http://localhost:8983/solr/dih/dataimport?command=delta-import";;

            ////Makes Async call to the Web API URL & trigger the data
import handler action.
            try
            {                
                using (var solrClient = new HttpClient())
                {
                    var resultObj = solrClient.GetAsync(new
Uri(solrTargetDIHUrl)).Result;
                    Console.ForegroundColor = ConsoleColor.Green;
                    Console.WriteLine("\t\t Data Import Triggered
Successfully !");
                    Console.ResetColor();

                }
            }
            catch(Exception ex)
            {
                Console.WriteLine("ERROR in DIH Trigger >>>>> " + ex.Message
+ "||" + ex.StackTrace);
            }



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to