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 SGE0 <st...@hotmail.com> on 2009/10/24 08:40:20 UTC

Solrj Javabin and JSON

Hi,

did anyone write a Javabin to JSON convertor and is willing to share this ?

In our servlet we use a CommonsHttpSolrServer instance to execute a query.

The problem is that is returns Javabin format and we need to send the result
back to the browser using JSON format.

And no, the browser is not allowed to directly query Lucene with the wt=json
format.

Regards,

S.
-- 
View this message in context: http://www.nabble.com/Solrj-Javabin-and-JSON-tp26036551p26036551.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solrj Javabin and JSON

Posted by Patrick Jungermann <pa...@googlemail.com>.
Hi Stefan,

you don't need to convert the Java objects built from the result
returned as Javabin. Instead of this, you could easily use the JSON
return format by setting "wt=json". See also at [0] for more information
about this.


Patrick


[0] http://wiki.apache.org/solr/SolJSON


SGE0 schrieb:
> Hi Paul,
> 
> 
> fair enough. Is this included in the Solrj package ? Any examples how to do
> this ?
> 
> 
> Stefan
> 
> 
> 
> Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
>> There is no point converting javabin to json. javabin is in
>> intermediate format it is converted to the java objects as soon as
>> comes. You just need means to convert the java object to json.
>>
>>
>>
>> On Sat, Oct 24, 2009 at 12:10 PM, SGE0 <st...@hotmail.com> wrote:
>>> Hi,
>>>
>>> did anyone write a Javabin to JSON convertor and is willing to share this
>>> ?
>>>
>>> In our servlet we use a CommonsHttpSolrServer instance to execute a
>>> query.
>>>
>>> The problem is that is returns Javabin format and we need to send the
>>> result
>>> back to the browser using JSON format.
>>>
>>> And no, the browser is not allowed to directly query Lucene with the
>>> wt=json
>>> format.
>>>
>>> Regards,
>>>
>>> S.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Solrj-Javabin-and-JSON-tp26036551p26036551.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> -- 
>> -----------------------------------------------------
>> Noble Paul | Principal Engineer| AOL | http://aol.com
>>
>>
> 


Re: Solrj Javabin and JSON

Posted by SGE0 <st...@hotmail.com>.
Hi Paul,


fair enough. Is this included in the Solrj package ? Any examples how to do
this ?


Stefan



Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> There is no point converting javabin to json. javabin is in
> intermediate format it is converted to the java objects as soon as
> comes. You just need means to convert the java object to json.
> 
> 
> 
> On Sat, Oct 24, 2009 at 12:10 PM, SGE0 <st...@hotmail.com> wrote:
>>
>> Hi,
>>
>> did anyone write a Javabin to JSON convertor and is willing to share this
>> ?
>>
>> In our servlet we use a CommonsHttpSolrServer instance to execute a
>> query.
>>
>> The problem is that is returns Javabin format and we need to send the
>> result
>> back to the browser using JSON format.
>>
>> And no, the browser is not allowed to directly query Lucene with the
>> wt=json
>> format.
>>
>> Regards,
>>
>> S.
>> --
>> View this message in context:
>> http://www.nabble.com/Solrj-Javabin-and-JSON-tp26036551p26036551.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Solrj-Javabin-and-JSON-tp26036551p26037017.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solrj Javabin and JSON

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@corp.aol.com>.
There is no point converting javabin to json. javabin is in
intermediate format it is converted to the java objects as soon as
comes. You just need means to convert the java object to json.



On Sat, Oct 24, 2009 at 12:10 PM, SGE0 <st...@hotmail.com> wrote:
>
> Hi,
>
> did anyone write a Javabin to JSON convertor and is willing to share this ?
>
> In our servlet we use a CommonsHttpSolrServer instance to execute a query.
>
> The problem is that is returns Javabin format and we need to send the result
> back to the browser using JSON format.
>
> And no, the browser is not allowed to directly query Lucene with the wt=json
> format.
>
> Regards,
>
> S.
> --
> View this message in context: http://www.nabble.com/Solrj-Javabin-and-JSON-tp26036551p26036551.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
-----------------------------------------------------
Noble Paul | Principal Engineer| AOL | http://aol.com