apache / apache/lucene

migrate KeywordRepeatFilter to conditional tokenstreams [LUCENE-8308]

Open
#9,355 2 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Major module:analysis type:task
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

we should deprecate KeywordAttribute in favor of #9320 which gives the analysis chain a real "if".

But this isn't straightforward unless we address the KeywordRepeatFilter which sends the token "both ways" down the branch condition. Maybe it can be handled as a subclass.

---
Migrated from [LUCENE-8308](https://issues.apache.org/jira/browse/LUCENE-8308) by Robert Muir (@rmuir)

Contributor guide

Open the contributing guide

Research direction

Start by reading issue #9320 and the existing KeywordRepeatFilter and KeywordAttribute implementations. Trace how KeywordRepeatFilter sends tokens through both branches of the conditional tokenstream, then identify the required design and relevant tests. Done means KeywordAttribute can be deprecated without losing KeywordRepeatFilter behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
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.