Hi Romi
As per me, you need to understand how ajax with jquery works .. then go for
json and then jsonp (if you are fetching from different)
query here is dynamic query which you will be trying to hit solr .. (it
could be simple text, or more advanced query string)
http://wiki.apache.org/solr/Co
$.getJSON(
"http://[server]:[port]/solr/select/?jsoncallback=?";,
{"q": queryString,
"version": "2.2",
"start": "0",
"rows": "10",
"indent": "on",
"json.wrf": "callbackFunctionToDoSomethingWithOurDa
did you include the jquery lib,
make sure you use the jsasoncallback
ie
$.getJSON(
"http://[server]:[port]/solr/select/?jsoncallback=?";,
{"q": queryString,
"version": "2.2",
"start": "0",
"rows": "10",
"indent":
I did this:
$(document).ready(function(){
$.getJSON("http://[remotehost]:8983/solr/select/?q=diamond&wt=json&json.wrf=?";,
function(result){
alert("hello" + result.response.docs[0].name);
});
});
But i am not getting any result, what i did wrong ??
-
Thanks & Regards
Romi
--
View this
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://[serv