rmuir commented on PR #12289:
URL: https://github.com/apache/lucene/pull/12289#issuecomment-1546611473

   I think the idea behind the test failure is this: this is a very advanced 
method and if you want to create a FilterTerms, to you know, filter the terms 
with a custom enum, the default implementation will continue to be correct and 
continue to work.
   
   but if FilterTerms delegates the `intersect` method, then in practice almost 
every subclass would need to `@Override` and re-implement it with different 
logic (probably looking like the default implementation!!!) to be correct. 
   
   Plus, if you are filtering Terms, its usually the case you are gonna 
customize the TermsEnum too. delegating this method would be confusing as it 
would just return the raw terms enum you are wrapping rather than your custom 
class.
   
   In general it is only safe to just delegate this method directly if you 
aren't changing anything serious about the Terms instance, so that you can just 
"pass it thru" and get correct results. You can do this in your particular 
FilterTerms subclass if you know it is safe?
   
   


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