elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.76k stars 24.69k forks source link

Could make Internal Engine more accessible? #66667

Closed luyuncheng closed 3 years ago

luyuncheng commented 3 years ago

When we want to build an external engine use EnginePlugin, and this external engine inherit from internal engine. it wants to make it's own IndexWriterConfig or Policy. but getIndexWriterConfig or createWriter are private method.

is there any possible to make Internal Engine more accessible from outside like EnginePlugin?

dnhatn commented 3 years ago

Thank you for your interest in Elasticsearch. Which settings would you like to change/add to IndexWriterConfig? Can you elaborate on your need? We avoid exposing these methods to ensure that the critical IWC's settings aren't overridden.

elasticmachine commented 3 years ago

Pinging @elastic/es-distributed (Team:Distributed)

luyuncheng commented 3 years ago

Thank you for your interest in Elasticsearch. Which settings would you like to change/add to IndexWriterConfig? Can you elaborate on your need? We avoid exposing these methods to ensure that the critical IWC's settings aren't overridden.

May we want to do some own work in Engine.

  1. may we want to inherit internal engine, change IndexWriterConfig.OpenMode, etc.
  2. some time's we are doing index write job, and we do not want to use setUseCompoundFile(true).
  3. setInfoStream can rewrite as other implementation which add some information plugin dev needed.
  4. SearchManager are all no overridden class. may some time want to extend Searcher like Ram-Disk-Index
dnhatn commented 3 years ago

@luyuncheng Thank you for your feedback.

  1. may we want to inherit internal engine, change IndexWriterConfig.OpenMode, etc.

InternalEngine must always use the APPEND mode.

  1. some time's we are doing index write job, and we do not want to use setUseCompoundFile(true).

This setting doesn't matter much if you don't refresh often, but the system can run out of file descriptors if you disable the compound files and refresh frequently.

  1. setInfoStream can rewrite as other implementation which add some information plugin dev needed.

You can control this via logging instead.

  1. SearchManager are all no overridden class. may some time want to extend Searcher like Ram-Disk-Index

Can you clarify the last point? It's not clear to me.

luyuncheng commented 3 years ago
  1. SearchManager are all no overridden class. may some time want to extend Searcher like Ram-Disk-Index

Can you clarify the last point? It's not clear to me.

As a plugin wants to make transport searchable in memory, so i want to inherit InternalEngine and override some method. but if expose all these method may not a good idea.

Thanks for replying.