apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.67k stars 1.03k forks source link

migrate KeywordRepeatFilter to conditional tokenstreams [LUCENE-8308] #9355

Open asfimport opened 6 years ago

asfimport commented 6 years ago

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 by Robert Muir (@rmuir)

asfimport commented 6 years ago

Robert Muir (@rmuir) (migrated from JIRA)

The other idea in mind being that we extend #9320 to support "else" essentially. Then this repeater case would be more transparent/obvious, it fires for both the "if" and the "else".

asfimport commented 6 years ago

Robert Muir (@rmuir) (migrated from JIRA)

also maybe terminally deprecate KeywordRepeatFilter, i mean I doubt we can preserve compat here 100%: that is what major versions are for. If there was an "else" condition it would make it very easy on the user to migrate.