Attached patch makes the required changes to IndexSchema. A few notes:
- includes a negative test in BadIndexSchemaTest for the combination of defaultSearchField and luceneMatchVersion
- there are some tests that fail with this patch on current master or branch_6x. There's a good number of schema's which still include defaultSearchField. As I understand what I read on
SOLR-7041, these test failures are "expected" for now, as the work to change these schemas is still ongoing. Just wanted to mention them here explicitly as a disclaimer, or in case I'm misunderstanding something and there's actual issues with the patch.
As a side note, in writing this patch, I noticed that most/all of the error cases in IndexSchema throw a SolrException with 500/ServerError. I'm not entirely sure how these status codes propagate out of this layer; maybe the status codes get changed in some cases before being returned to users. But it might be more intuitive/correct to expose these as 400's/BadRequest. I know that runs into deprecation concerns, and all that. Just wanted to check my understanding and make sure I was reading things correctly before creating a JIRA.