When a data frame analytics job is started it will automatically create its destination index if it doesn't already exist.

When this happens the mappings are copied from the source indices.  In addition two settings are copied from the source indices: `index.number_of_shards` and `index.number_of_replicas`.

However, for certain mappings in can be necessary that more settings are copied from the source indices.  For example, `index.analysis`, `index.similarity` and `index.mapping` might be needed to make the destination index search results look like those of the source indices.  In the case of custom analyzers defined in the index settings the destination index definition might not even be valid without the `index.analysis` setting that defines the custom analyzers.

So, we need to copy `index.analysis`, `index.similarity` and `index.mapping` from the source settings to destination settings.  Some thought is still required as this could be complex in the case of multiple source indices with different settings.  It might be possible to do a simple merge like we do for mappings.
x-pack/plugin/ml/src/test/java/org/elasticsearch/xpack/ml/dataframe/DestinationIndexTests.java
private static final String ANALYTICS_ID = "some-analytics-id";
    private static final String[] SOURCE_INDEX = new String[] { "source-index" };
    private static final String DEST_INDEX = "dest-index";
    private static final String NUMERICAL_FIELD = "numerical-field";
    private static final String OUTER_FIELD = "outer-field";
    private static final String INNER_FIELD = "inner-field";
    private static final String ALIAS_TO_NUMERICAL_FIELD = "alias-to-numerical-field";
    private static final String ALIAS_TO_NESTED_FIELD = "alias-to-nested-field";
    private static final int CURRENT_TIME_MILLIS = 123456789;
    private static final String CREATED_BY = "data-frame-analytics";
    private ThreadPool threadPool = mock(ThreadPool.class);
    private Client client = mock(Client.class);
    private Clock clock = Clock.fixed(Instant.ofEpochMilli(123456789L), ZoneId.systemDefault());
    @Before
    public void setUpMocks() {
        when(client.threadPool()).thenReturn(threadPool);
        when(threadPool.getThreadContext()).thenReturn(new ThreadContext(Settings.EMPTY));
    }
    private Map<String, Object> testCreateDestinationIndex(DataFrameAnalysis analysis) throws IOException {
        DataFrameAnalyticsConfig config = createConfig(analysis);
        ArgumentCaptor<CreateIndexRequest> createIndexRequestCaptor = ArgumentCaptor.forClass(CreateIndexRequest.class);
        doAnswer(callListenerOnResponse(null)).when(client)
            .execute(eq(CreateIndexAction.INSTANCE), createIndexRequestCaptor.capture(), any());
        Settings index1Settings = Settings.builder()
            .put(IndexMetadata.SETTING_VERSION_CREATED, Version.CURRENT)