Would really appreciate if someone could tell me how I can change all of my _type entries in a index to be the same.
Right now some are 'log' and some are 'doc' when really they should all be doc.
I hear that reindexing would work however I want to keep the index name, furthermore doesn't reindexing cause issues with mapping? Since I want the mapping to remain the same.
The only reason this is needed, is because Elastic's python API seems to limit search queries based on the _type which is causing major headache. I'd like to keep all _type's the same otherwise not all the entries get returned. More info here: https://github.com/elastic/elasticsearch-dsl-py/issues/761#issuecomment-340278067
To do so I am trying to reindex like so. I have setup the mapping for the new index.
However I keep getting the error { "error" : { "root_cause" : [ { "type" : "null_pointer_exception", "reason" : "Can't reindex without a destination type!" } ], "type" : "null_pointer_exception", "reason" : "Can't reindex without a destination type!" }, "status" : 500 }
This should take log and doc types and add them to the new index all under the doc type. However I can't see to solve the error I keep getting about how the destination needs a type. I thought I specified that properly?
Why not just reindex the current log types to be doc and in the existing index? They won't conflict and you reduce your reindex load by half (of the types).
Removing the script completely, specifying the type to import to fixed the issue in the new index! It combined the log and doc types from the logs index into new_logs.
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.