Warn for dangerous IndexWriter settings

Description

Usually we let the user set all IndexWriter tuning settings in a different way in "batch" mode or in "transaction" mode.

MAX_FIELD_LENGTH and USE_COMPOUND_FILE are actually not impacting only performance but also how and what gets indexed,
so for MAX_FIELD_LENGTH we need to log a warning (because it sounds really wrong but someone may like it),
and throw an exception for USE_COMPOUND_FILE (because this would be dangerous).

Environment

None

Status

Assignee

Emmanuel Bernard

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Fix versions

Affects versions

3.1.0.Beta2

Priority

Trivial
Configure