This is just a starting point. I think it may be a challenge to get that to work well.
If you can, I'd recommend an alternative approach. I recommend putting all of your documents into a single engine. Use a "type" field for the type of document, rather than putting them into separate engines.
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.