javanna opened a new issue, #17015:
URL: https://github.com/apache/lucene/issues/17015

     `SynonymFilter` / `SynonymFilterFactory` and `WordDelimiterFilter` / 
`WordDelimiterFilterFactory` have been deprecated since Lucene 6.4 / 7.0, 
pointing users at `SynonymGraphFilter` and `WordDelimiterGraphFilter` (plus 
`FlattenGraphFilter` at index time).
   
   
   Based on their deprecation state, they were listed for removal on #16918. 
   It was raised in #16966 that there is no adequate replacement for analysis 
chains built on the old filters. That matches earlier discussion, and I wonder 
if we should un-deprecate them and/or figure out a plan to offset them.
   
   I attempted to collect context on the topic, please feel free to chime in 
and add your thoughts:  `SynonymGraphFilter` (LUCENE-6664 / #7722) produces a 
correct token graph for multi-token synonyms, which the old filter does not. It 
is the right tool at query time, but not a drop-in for index-time chains:
   
   - Both `SynonymGraphFilter` and `WordDelimiterGraphFilter` still document 
that they cannot consume an incoming graph. Results are undefined if you stack 
them.
   - The last comment on #7722 is still unanswered: how do you use 
WordDelimiter and Synonym in one chain if both graph versions cannot compose?
   - Index-time synonym expansion is lossy either way. The index does not store 
`posLength`, so you must flatten. `SynonymFilter` already does that flattening.
   - `SynonymGraphFilter` is still experimental ~10 years later.
   
   We reached a similar conclusion when we previously tried to remove 
deprecations (LUCENE-8638 / #9684): graph filters are not full replacements 
until they can consume graphs. On #9769, the same point was made.
   
   We also a very old PR to remove word delimiter filter 
(https://github.com/apache/lucene/pull/202) which never landed and related 
issue at https://github.com/apache/lucene/issues/9728 .
   
   Keeping these deprecated made them look like dead APIs that are going to be 
removed and can be replaced, but that isn't the case. What was the reason to 
deprecate those? Should we un-deprecate them for now, and optionally work on 
being able to replace them so they can be effectively removed in the future?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to