this is from another post and could help Can you use a javascript library which handles ajax and json / jsonp You will end up with much cleaner client code for example a jquery implementation looks quite nice using solrs neat jsonp support:
queryString = "*:*" $.getJSON( "http://[server]:[port]/solr/select/?jsoncallback=?", {"q": queryString, "version": "2.2", "start": "0", "rows": "10", "indent": "on", "json.wrf": "callbackFunctionToDoSomethingWithOurData", "wt": "json", "fl": "field1"} ); and the callback function function callbackFunctionToDoSomethingWithOurData(solrData) { // do stuff with your nice data } Their is also a javascript client for solr as well but i've not used this On 2 June 2011 08:14, Romi <romijain3...@gmail.com> wrote: > Hi, I am creating indexes using solr which is running on jetty server port > 8983, and my application is running on tomcat server port 8080. Now my > problem is i want to display the results of search on my application. i > created a ajax-javascript page for parsing Json object. now please suggest > me how i send my request to solr server for search and get back the result. > > Here is my sample html file where i parsed Json data. > > <html> > <head> > <title>Solr Ajax Example</title> > > </head> > <body> > > <form name="f1" onsubmit='xmlhttpPost("/solr/db/select"); return false;'> > <p>query: <input name="query" type="text"> > <input value="Go" type="submit"></p> > > <div id="result"></div> > <p/><pre>Raw JSON String: <div id="raw"></div></pre> > </form> > </body> > </html> > > > > I suppose i am making mistake in xmlhttpPost("/solr/db/select"). > > Thanks and regards > Romi. > > ----- > Thanks & Regards > Romi > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-display-search-results-of-solr-in-to-other-application-tp3014101p3014101.html > Sent from the Solr - User mailing list archive at Nabble.com. >