First, how do you know which documents you need to reindex? Also, do you
want to reindex them based on the data stored in elasticsearch itself, or
based on "outside" data?
If you have hte docs that need to be reindexed in a database, for example,
just fetch them from it, and index those docs again.
If its simply based on their IDs and index it from elasticsearch, you can
simply use the Get / Multi Get API to fetch the docs, change then, and index
it again (you can use versioning to make sure no other updates have happened
If its based on a query, you can execute the search query, possibly using
the scan search type (
reindex the docs that match it.
On Thu, Oct 13, 2011 at 9:55 PM, Shane Witbeck email@example.com:
I'm in the process of indexing some forums via the Java API. What's
the recommended way to re-index individual documents? Could someone
explain the steps necessary for doing this? Even better, if there's an
example using the Java API showing this common use case, I'd be
interested in seeing that too.