SearchRequestBuilder to Json

Hello,

I would like to know if there is a way to transform a SearchQueryBuilder
into its corresponding Json format.

When I use toString() on a SearchQueryBuilder I get a partial Json :
{
"from" : 0,
"size" : 200,
"query" : {
"bool" : {
"should" : [ {
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}
}, {
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMioifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMiJ9fV19fQ=="
}
} ]
}
},
"fields" : [ "body" ]
}

Can I have the full Json ?

Thanks in advance.
Pierre.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Pierre,

Why do you think it's partial?
What is missing here?

David

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 8 avr. 2013 à 09:53, Pierre De Soyres pierre.de-soyres@eptica.com a écrit :

Hello,

I would like to know if there is a way to transform a SearchQueryBuilder into its corresponding Json format.

When I use toString() on a SearchQueryBuilder I get a partial Json :
{
"from" : 0,
"size" : 200,
"query" : {
"bool" : {
"should" : [ {
"wrapper" : {
"query" : "eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}
}, {
"wrapper" : {
"query" : "eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMioifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMiJ9fV19fQ=="
}
} ]
}
},
"fields" : [ "body" ]
}

Can I have the full Json ?

Thanks in advance.
Pierre.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi David,

I would klike to decode the wrapper part :
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}

I don't understand this format

Pierre

Le lundi 8 avril 2013 09:59:23 UTC+2, David Pilato a écrit :

Hi Pierre,

Why do you think it's partial?
What is missing here?

David

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 8 avr. 2013 à 09:53, Pierre De Soyres <pierre.d...@eptica.com<javascript:>>
a écrit :

Hello,

I would like to know if there is a way to transform a SearchQueryBuilder
into its corresponding Json format.

When I use toString() on a SearchQueryBuilder I get a partial Json :
{
"from" : 0,
"size" : 200,
"query" : {
"bool" : {
"should" : [ {
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}
}, {
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMioifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMiJ9fV19fQ=="
}
} ]
}
},
"fields" : [ "body" ]
}

Can I have the full Json ?

Thanks in advance.
Pierre.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

So do I.

What is your initial request (in Java)?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 8 avr. 2013 à 10:02, Pierre De Soyres pierre.de-soyres@eptica.com a écrit :

Hi David,

I would klike to decode the wrapper part :
"wrapper" : {
"query" : "eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}

I don't understand this format

Pierre

Le lundi 8 avril 2013 09:59:23 UTC+2, David Pilato a écrit :
Hi Pierre,

Why do you think it's partial?
What is missing here?

David

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 8 avr. 2013 à 09:53, Pierre De Soyres pierre.d...@eptica.com a écrit :

Hello,

I would like to know if there is a way to transform a SearchQueryBuilder into its corresponding Json format.

When I use toString() on a SearchQueryBuilder I get a partial Json :
{
"from" : 0,
"size" : 200,
"query" : {
"bool" : {
"should" : [ {
"wrapper" : {
"query" : "eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}
}, {
"wrapper" : {
"query" : "eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMioifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMiJ9fV19fQ=="
}
} ]
}
},
"fields" : [ "body" ]
}

Can I have the full Json ?

Thanks in advance.
Pierre.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

It is a WrapperQueryBuilder. I understand that the value of the "query"
param is the initial Json Base64 encoded.

Le lundi 8 avril 2013 10:08:10 UTC+2, David Pilato a écrit :

So do I.

What is your initial request (in Java)?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 8 avr. 2013 à 10:02, Pierre De Soyres <pierre.d...@eptica.com<javascript:>>
a écrit :

Hi David,

I would klike to decode the wrapper part :
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}

I don't understand this format

Pierre

Le lundi 8 avril 2013 09:59:23 UTC+2, David Pilato a écrit :

Hi Pierre,

Why do you think it's partial?
What is missing here?

David

David Pilato | Technical Advocate | *Elasticsearch.comhttp://elasticsearch.com/
*
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr
| @scrutmydocs https://twitter.com/scrutmydocs

Le 8 avr. 2013 à 09:53, Pierre De Soyres pierre.d...@eptica.com a
écrit :

Hello,

I would like to know if there is a way to transform a SearchQueryBuilder
into its corresponding Json format.

When I use toString() on a SearchQueryBuilder I get a partial Json :
{
"from" : 0,
"size" : 200,
"query" : {
"bool" : {
"should" : [ {
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMSoifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMSJ9fV19fQ=="
}
}, {
"wrapper" : {
"query" :
"eyJib29sIjp7Im11c3QiOlt7IndpbGRjYXJkIjp7InN0cmluZ0ZpZWxkIjoiKnZhbHVlMioifX0seyJtYXRjaCI6eyJzdHJpbmdGaWVsZCI6InZhbHVlMiJ9fV19fQ=="
}
} ]
}
},
"fields" : [ "body" ]
}

Can I have the full Json ?

Thanks in advance.
Pierre.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I never used a WrapperQueryBuilder.
How do you add your JSON query in it? String? Binary?
If you are using binary content, it looks fine to me that Elasticsearch display your query as you sent it.

Do you really need to use a WrapperQuery?

My 2 cents

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 8 avr. 2013 à 11:46, Pierre De Soyres pierre.de-soyres@eptica.com a écrit :

WrapperQueryBuilder

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.