ES-Fastloader icon indicating copy to clipboard operation
ES-Fastloader copied to clipboard

why not use reflect to get InternalEngine and IndexWriter?

Open zhangdapao745 opened this issue 4 years ago • 1 comments

if use reflect to get InternalEngine and IndexWriter, we need not modify elasticsearch source code

zhangdapao745 avatar Aug 23 '21 03:08 zhangdapao745

AppendLuceneTransportAction::doExecuteCore

            /* FIXME 这里需要修改es的代码, 将lucene的IndexWriter对象暴露给plugin使用  */
            InternalEngine engine = (InternalEngine) shard.getEngineOrNull();
            IndexWriter indexWriter = engine.getIndexWriter();```

zhangdapao745 avatar Aug 23 '21 06:08 zhangdapao745