[ 
https://issues.apache.org/jira/browse/LUCENE-9705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17299868#comment-17299868
 ] 

Greg Miller commented on LUCENE-9705:
-------------------------------------

Thanks [~jpountz] for the link (and [~julietibs] for creating the README)! 
Makes complete sense to me. It sounds like my reference to the "utility" 
classes is already well thought out (and documented in the README) as the 
"helper classes" that must be copied.

It's too bad there's not a way to make these helper classes common between the 
backwards compatible codecs and the current codecs while still maintaining 
package privacy. I've always thought it would be nice to have "inherited 
package private" access modifier in java that would allow package-visible 
classes to be visible in all sub-packages as well. If something like that 
existed, you could image a structure like the following where utility classes 
could exist at a top level and not need to be duplicated:

o.a.l.codecs.ForUtil.java (still package-private)

o.a.l.codecs.lucene90.Lucene90PostingsReader.java

o.a.l.codecs.backwards_codecs.lucene84.Lucene84PostingsReader.java

But, given current choices, I agree that duplication is the right trade-off to 
maintain package privacy. It seems I've wandered a little far off into the 
weeds now, so I'll leave it there. Thanks for entertaining my meandering rant :)

> Move all codec formats to the o.a.l.codecs.Lucene90 package
> -----------------------------------------------------------
>
>                 Key: LUCENE-9705
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9705
>             Project: Lucene - Core
>          Issue Type: Wish
>            Reporter: Ignacio Vera
>            Priority: Major
>          Time Spent: 9.5h
>  Remaining Estimate: 0h
>
> Current formats are distributed in different packages, prefixed with the 
> Lucene version they were created. With the upcoming release of Lucene 9.0, it 
> would be nice to move all those formats to just the o.a.l.codecs.Lucene90 
> package (and of course moving the current ones to the backwards-codecs).
> This issue would actually facilitate moving the directory API to little 
> endian (LUCENE-9047) as the only codecs that would need to handle backwards 
> compatibility will be the codecs in backwards codecs.
> In addition, it can help formalising the use of internal versions vs format 
> versioning ( LUCENE-9616)
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to