is it possible (in one step) to index documents that match the results of
a given query? That is, similar to the Delete by Query API, can one index
by query?
Do you mean update by query? If so, there is an open issue to support it:
If you really mean index by query, you would need to provide an example,
because I don't see how something would be returned by a query unless it
already existed.
is it possible (in one step) to index documents that match the results of
a given query? That is, similar to the Delete by Query API, can one index
by query?
is it possible (in one step) to index documents that match the
results of a given query? That is, similar to the Delete by Query API,
can one index by query?
This is something you would need to handle yourself. Depending on which
client API you use, you may already have some utilities available to
make it easy.
size: 1000
the number of docs to return in each request. actually, with
'scan', this means the number of docs to return from EACH shard
in each request, eg 5 * 1000 = max of 5000 docs in each request
The above search request will return a scroll ID. You pass that scroll
ID to each subsequent "scroll" request /_search/scroll, until you get no
more hits.
The parameters are:
scroll: "1m"
refresh the lock on the scroll snapshot and keep it in place for
another one minutes
scroll_id: "xxxx"
the scroll ID returned by the original search request, or by the
previous scroll request. You MUST update this scroll ID to have
the value of the previous request
Each time you call /_search/scroll you will get another batch of
documents.
You can reindex those (to a new index, or after making any changes)
using the "bulk" API.
If you really mean index by query, you would need to provide an example,
because I don't see how something would be returned by a query unless it
already existed.
Cheers,
Ivan
On Thu, Feb 21, 2013 at 2:37 PM, sbellem <sbe...@gmail.com <javascript:>>wrote:
Hi,
is it possible (in one step) to index documents that match the results
of a given query? That is, similar to the Delete by Query API, can one
index by query?
Thanks,
Sylvain
--
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.
If you really mean index by query, you would need to provide an example,
because I don't see how something would be returned by a query unless it
already existed.
Cheers,
Ivan
On Thu, Feb 21, 2013 at 2:37 PM, sbellem <sbe...@gmail.com <javascript:>>wrote:
Hi,
is it possible (in one step) to index documents that match the results
of a given query? That is, similar to the Delete by Query API, can one
index by query?
Thanks,
Sylvain
--
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.
On Friday, 22 February 2013 11:43:05 UTC+1, Clinton Gormley wrote:
Hiya
is it possible (in one step) to index documents that match the
results of a given query? That is, similar to the Delete by Query API,
can one index by query?
This is something you would need to handle yourself. Depending on which
client API you use, you may already have some utilities available to
make it easy.
size: 1000
the number of docs to return in each request. actually, with
'scan', this means the number of docs to return from EACH shard
in each request, eg 5 * 1000 = max of 5000 docs in each request
The above search request will return a scroll ID. You pass that scroll
ID to each subsequent "scroll" request /_search/scroll, until you get no
more hits.
scroll: "1m"
refresh the lock on the scroll snapshot and keep it in place for
another one minutes
scroll_id: "xxxx"
the scroll ID returned by the original search request, or by the
previous scroll request. You MUST update this scroll ID to have
the value of the previous request
Each time you call /_search/scroll you will get another batch of
documents.
You can reindex those (to a new index, or after making any changes)
using the "bulk" API.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.