apache / apache/lucene

Make token stream settings as final and only set on construction

Open
#13,112 0 comments 1 reaction 0 assignees View on GitHub
type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ShingleFilter API and the discussion in pull request 13104 to identify which token-stream settings can currently change after construction. Done means the intended construction-time-only constraint is defined and applied consistently, with affected API behavior covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, search
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.