How to save Query JSON as it is in an Index?

I want to save the query JSON as it as in a field in an ES index. I should
be able to retrieve queries and run it at a later time. I don't need
features like percolator. I am using Java client to index and retrieve.

What should I do to achieve this?

Thanks.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/a11a80e4-68c1-4e30-8b14-b6296a0f365a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I don't get your point, can you describe more detail?

On Tuesday, December 31, 2013 8:23:22 AM UTC+8, Search User wrote:

I want to save the query JSON as it as in a field in an ES index. I should
be able to retrieve queries and run it at a later time. I don't need
features like percolator. I am using Java client to index and retrieve.

What should I do to achieve this?

Thanks.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/cd59317e-24a9-4074-af40-fe2439d4bc6e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

I want to save the queries my users are executing and let them re-run at a
later time.

Thanks,

On Tuesday, December 31, 2013 1:21:16 AM UTC-5, Daniel Guo wrote:

I don't get your point, can you describe more detail?

On Tuesday, December 31, 2013 8:23:22 AM UTC+8, Search User wrote:

I want to save the query JSON as it as in a field in an ES index. I
should be able to retrieve queries and run it at a later time. I don't need
features like percolator. I am using Java client to index and retrieve.

What should I do to achieve this?

Thanks.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/28ee8010-df47-489f-90df-07e41d831d42%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

you could simply use the toString(), or even better the toXContent()
representation of a query and store it in another index, when executing
queries using your java API.

Alternatively you could set the thresholds for the slow index log very log
and thus log every index operation (this has a performance impact), see

--Alex

On Tue, Dec 31, 2013 at 7:53 PM, Search User feedworks@gmail.com wrote:

I want to save the queries my users are executing and let them re-run at a
later time.

Thanks,

On Tuesday, December 31, 2013 1:21:16 AM UTC-5, Daniel Guo wrote:

I don't get your point, can you describe more detail?

On Tuesday, December 31, 2013 8:23:22 AM UTC+8, Search User wrote:

I want to save the query JSON as it as in a field in an ES index. I
should be able to retrieve queries and run it at a later time. I don't need
features like percolator. I am using Java client to index and retrieve.

What should I do to achieve this?

Thanks.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/28ee8010-df47-489f-90df-07e41d831d42%40googlegroups.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8Ua5bLHhhnf5r2VdL99LDQVbazfu%3DsLK1z_w8UHn5W4w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

I have an identical requirement and have a question: if we save the query
using toXContent() would the same query work fine when the version of
Elasticsearch changes (say it went through some major version change)?

-Amit.

On Wed, Jan 1, 2014 at 12:27 PM, Alexander Reelsen alr@spinscale.de wrote:

Hey,

you could simply use the toString(), or even better the toXContent()
representation of a query and store it in another index, when executing
queries using your java API.

Alternatively you could set the thresholds for the slow index log very log
and thus log every index operation (this has a performance impact), see

Elasticsearch Platform — Find real-time answers at scale | Elastic

--Alex

On Tue, Dec 31, 2013 at 7:53 PM, Search User feedworks@gmail.com wrote:

I want to save the queries my users are executing and let them re-run at
a later time.

Thanks,

On Tuesday, December 31, 2013 1:21:16 AM UTC-5, Daniel Guo wrote:

I don't get your point, can you describe more detail?

On Tuesday, December 31, 2013 8:23:22 AM UTC+8, Search User wrote:

I want to save the query JSON as it as in a field in an ES index. I
should be able to retrieve queries and run it at a later time. I don't need
features like percolator. I am using Java client to index and retrieve.

What should I do to achieve this?

Thanks.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/28ee8010-df47-489f-90df-07e41d831d42%40googlegroups.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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8Ua5bLHhhnf5r2VdL99LDQVbazfu%3DsLK1z_w8UHn5W4w%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAAOGaQ%2BC5vKe93gFRu1GnHwhH-P2woRP6yutvChWo%3DSFh3rHsw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

I am not sure I understand your concern. Of course, there is a possibility
that the toXContent() method possibly changes over versions, but it didnt
for quite some time (as this would also change the JSON response format)
and I think it makes sense to be pretty conservative with changes there...

--Alex

On Mon, Feb 3, 2014 at 8:44 AM, Amit Soni amitsoni29@gmail.com wrote:

I have an identical requirement and have a question: if we save the query
using toXContent() would the same query work fine when the version of
Elasticsearch changes (say it went through some major version change)?

-Amit.

On Wed, Jan 1, 2014 at 12:27 PM, Alexander Reelsen alr@spinscale.dewrote:

Hey,

you could simply use the toString(), or even better the toXContent()
representation of a query and store it in another index, when executing
queries using your java API.

Alternatively you could set the thresholds for the slow index log very
log and thus log every index operation (this has a performance impact), see

Elasticsearch Platform — Find real-time answers at scale | Elastic

--Alex

On Tue, Dec 31, 2013 at 7:53 PM, Search User feedworks@gmail.com wrote:

I want to save the queries my users are executing and let them re-run at
a later time.

Thanks,

On Tuesday, December 31, 2013 1:21:16 AM UTC-5, Daniel Guo wrote:

I don't get your point, can you describe more detail?

On Tuesday, December 31, 2013 8:23:22 AM UTC+8, Search User wrote:

I want to save the query JSON as it as in a field in an ES index. I
should be able to retrieve queries and run it at a later time. I don't need
features like percolator. I am using Java client to index and retrieve.

What should I do to achieve this?

Thanks.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/28ee8010-df47-489f-90df-07e41d831d42%40googlegroups.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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8Ua5bLHhhnf5r2VdL99LDQVbazfu%3DsLK1z_w8UHn5W4w%40mail.gmail.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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAAOGaQ%2BC5vKe93gFRu1GnHwhH-P2woRP6yutvChWo%3DSFh3rHsw%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8NgsaRjQe4od70TVCTq1g%3DKhSr-tFW%3D-bqZPqv%3D8gSiA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.