You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Romi <ro...@gmail.com> on 2011/06/02 09:27:52 UTC

how to request for Json object

How to parse Json through ajax when your ajax pager is on one
server(Tomcat)and Json object is of onther server(solr server). i mean i
have to make a request to another server, how can i do it .

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014138.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: 'deltaImportQuery' attribute is not specified for entity : user

Posted by Romi <ro...@gmail.com>.
take a look at the following url it might help you.
http://wiki.apache.org/solr/DataImportHandler#Using_delta-import_command

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014805.html
Sent from the Solr - User mailing list archive at Nabble.com.

'deltaImportQuery' attribute is not specified for entity : user

Posted by ZiLi <da...@163.com>.
Hi,I'm try to build a delta index .
I really have a entity calls 'user' in data-config.xml like 

'<entity name="user" query="" deltaQuery="select p.UserId ***" '

but when the index building starts, it always told me failed , when I check the tomcat's log ,it told me that warning then then a java's NullPointerException  will occurs.

Any suggestions will be appreciate .

Re: how to request for Json object

Posted by Romi <ro...@gmail.com>.
 $.getJSON("http://192.168.1.9:8983/solr/db/select/?q=diamond&wt=json&json.wrf=?",
function(result){

 alert("hello" + result.response.docs[0].name);
});
});

using this i got the result. But as you can see it is hard coded, i am
passing a query in the url how can i make it as user choice.


-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014928.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to request for Json object

Posted by lee carroll <le...@googlemail.com>.
just to re-iterate jasonp gets round ajax same server policy



2011/6/2 François Schiettecatte <fs...@gmail.com>:
> This is not really an issue with SOLR per se, and I have run into this before, you will need to read up on 'Access-Control-Allow-Origin' which needs to be set in the http headers that your ajax pager is returning. Beware that not all browsers obey it and Olivier is right when he suggested creating a proxy, which I did.
>
> François
>
> On Jun 2, 2011, at 3:27 AM, Romi wrote:
>
>> How to parse Json through ajax when your ajax pager is on one
>> server(Tomcat)and Json object is of onther server(solr server). i mean i
>> have to make a request to another server, how can i do it .
>>
>> -----
>> Thanks & Regards
>> Romi
>> --
>> View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014138.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: how to request for Json object

Posted by François Schiettecatte <fs...@gmail.com>.
This is not really an issue with SOLR per se, and I have run into this before, you will need to read up on 'Access-Control-Allow-Origin' which needs to be set in the http headers that your ajax pager is returning. Beware that not all browsers obey it and Olivier is right when he suggested creating a proxy, which I did.

François

On Jun 2, 2011, at 3:27 AM, Romi wrote:

> How to parse Json through ajax when your ajax pager is on one
> server(Tomcat)and Json object is of onther server(solr server). i mean i
> have to make a request to another server, how can i do it .
> 
> -----
> Thanks & Regards
> Romi
> --
> View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014138.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to request for Json object

Posted by Romi <ro...@gmail.com>.
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 message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014792.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to request for Json object

Posted by lee carroll <le...@googlemail.com>.
use solrs jasonp format



On 2 June 2011 08:54, Romi <ro...@gmail.com> wrote:
> sorry for the inconvenience, please look at this file
> http://lucene.472066.n3.nabble.com/file/n3014224/JsonJquery.text
> JsonJquery.text
>
>
>
> -----
> Thanks & Regards
> Romi
> --
> View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014224.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: how to request for Json object

Posted by Romi <ro...@gmail.com>.
sorry for the inconvenience, please look at this file
http://lucene.472066.n3.nabble.com/file/n3014224/JsonJquery.text
JsonJquery.text 



-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014224.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to request for Json object

Posted by Romi <ro...@gmail.com>.
look at d uploaded file here here it is making request from my local server 
for Json to server "http://api.flickr.com 
i juss want the same i want to request for Json from local server to solr
server.
http://lucene.472066.n3.nabble.com/file/n3014191/Jquery_Json.html
Jquery_Json.html 

-----
Thanks & Regards
Romi
--
View this message in context: http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014191.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to request for Json object

Posted by olivier sallou <ol...@gmail.com>.
ajax does not allow request to an other domain.
Only sway, unless using server side requests, is going through a proxy that
would hide the host origin so that ajax request think both servers are the
same

2011/6/2 Romi <ro...@gmail.com>

> How to parse Json through ajax when your ajax pager is on one
> server(Tomcat)and Json object is of onther server(solr server). i mean i
> have to make a request to another server, how can i do it .
>
> -----
> Thanks & Regards
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/how-to-request-for-Json-object-tp3014138p3014138.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>