lucene
lucene copied to clipboard
Make token stream settings as final and only set on construction
Description
As discussed in https://github.com/apache/lucene/pull/13104, the current API allows for changing the configuration of token streams after construction(such as ShingleFilter), but it should be set only during construction. Perhaps we can impose some constraints on the API to prevent more such cases in the future.