[Just Pushed]: xContent - A JSON abstraction allowing for other types

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Just Pushed]: xContent - A JSON abstraction allowing for other types

kimchy
Administrator
Hi,

  Just pushed this: http://github.com/elasticsearch/elasticsearch/issues/issue/152. Basically, the idea I had is to create a wrapper on top of how elasticsearch handles JSON allowing for other wire formats (with same JSON characteristics) to be supported. The first implementation aside from JSON is XSON, which is an optimized binary format of JSON (I will doc the BNF soon).

  A note for Java API users, some classes have been renamed. The previous JsonXXX have been removed and renamed. Also, by default, the query / filter builders and the search source builders use the XSON format which means faster operations :). It is up to you to decide how to encode the indexable data, either using JSON or XSON. ElasticSearch will automatically handle both.

cheers,
shay.banon
Reply | Threaded
Open this post in threaded view
|

Re: [Just Pushed]: xContent - A JSON abstraction allowing for other types

Sergio Bossa
Hi Shay,

sounds very cool, but why didn't you use BSON (http://bsonspec.org),
rather than your own binary format?

On Thu, Apr 29, 2010 at 10:14 PM, Shay Banon
<[hidden email]> wrote:

> Hi,
>   Just pushed
> this: http://github.com/elasticsearch/elasticsearch/issues/issue/152.
> Basically, the idea I had is to create a wrapper on top of how elasticsearch
> handles JSON allowing for other wire formats (with same JSON
> characteristics) to be supported. The first implementation aside from JSON
> is XSON, which is an optimized binary format of JSON (I will doc the BNF
> soon).
>   A note for Java API users, some classes have been renamed. The previous
> JsonXXX have been removed and renamed. Also, by default, the query / filter
> builders and the search source builders use the XSON format which means
> faster operations :). It is up to you to decide how to encode the indexable
> data, either using JSON or XSON. ElasticSearch will automatically handle
> both.
> cheers,
> shay.banon



--
Sergio Bossa
http://www.linkedin.com/in/sergiob
Reply | Threaded
Open this post in threaded view
|

Re: [Just Pushed]: xContent - A JSON abstraction allowing for other types

kimchy
Administrator
BSon might also be supported, but I don't really like the format as its not aimed at streaming data (pull parsing). For example, you need to write the size of the array before you write all its elements. This is an aspect of JSON that I really wanted to preserve.

Also, BSON is a superset of JSON, while XSON is exactly like JSON.

cheers,
shay.banon

On Thu, Apr 29, 2010 at 11:19 PM, Sergio Bossa <[hidden email]> wrote:
Hi Shay,

sounds very cool, but why didn't you use BSON (http://bsonspec.org),
rather than your own binary format?

On Thu, Apr 29, 2010 at 10:14 PM, Shay Banon
<[hidden email]> wrote:
> Hi,
>   Just pushed
> this: http://github.com/elasticsearch/elasticsearch/issues/issue/152.
> Basically, the idea I had is to create a wrapper on top of how elasticsearch
> handles JSON allowing for other wire formats (with same JSON
> characteristics) to be supported. The first implementation aside from JSON
> is XSON, which is an optimized binary format of JSON (I will doc the BNF
> soon).
>   A note for Java API users, some classes have been renamed. The previous
> JsonXXX have been removed and renamed. Also, by default, the query / filter
> builders and the search source builders use the XSON format which means
> faster operations :). It is up to you to decide how to encode the indexable
> data, either using JSON or XSON. ElasticSearch will automatically handle
> both.
> cheers,
> shay.banon



--
Sergio Bossa
http://www.linkedin.com/in/sergiob

Reply | Threaded
Open this post in threaded view
|

Re: [Just Pushed]: xContent - A JSON abstraction allowing for other types

Sergio Bossa
Thanks, I'll take a look.

Sergio Bossa
Sent by iPhone

Il giorno 29/apr/2010, alle ore 22.21, Shay Banon <[hidden email]> ha scritto:

BSon might also be supported, but I don't really like the format as its not aimed at streaming data (pull parsing). For example, you need to write the size of the array before you write all its elements. This is an aspect of JSON that I really wanted to preserve.

Also, BSON is a superset of JSON, while XSON is exactly like JSON.

cheers,
shay.banon

On Thu, Apr 29, 2010 at 11:19 PM, Sergio Bossa <[hidden email]> wrote:
Hi Shay,

sounds very cool, but why didn't you use BSON (http://bsonspec.org),
rather than your own binary format?

On Thu, Apr 29, 2010 at 10:14 PM, Shay Banon
<[hidden email]> wrote:
> Hi,
>   Just pushed
> this: http://github.com/elasticsearch/elasticsearch/issues/issue/152.
> Basically, the idea I had is to create a wrapper on top of how elasticsearch
> handles JSON allowing for other wire formats (with same JSON
> characteristics) to be supported. The first implementation aside from JSON
> is XSON, which is an optimized binary format of JSON (I will doc the BNF
> soon).
>   A note for Java API users, some classes have been renamed. The previous
> JsonXXX have been removed and renamed. Also, by default, the query / filter
> builders and the search source builders use the XSON format which means
> faster operations :). It is up to you to decide how to encode the indexable
> data, either using JSON or XSON. ElasticSearch will automatically handle
> both.
> cheers,
> shay.banon



--
Sergio Bossa
http://www.linkedin.com/in/sergiob