You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "slow-J (via GitHub)" <gi...@apache.org> on 2023/12/12 16:07:21 UTC

[PR] Writing a HOWTO migrate codec version [lucene]

slow-J opened a new pull request, #12930:
URL: https://github.com/apache/lucene/pull/12930

   More detail in https://github.com/apache/lucene/issues/12918. 
   Changing PFOR encoding to FOR for doc blocks in #12741, required bumping the codec version. The codec upgrade process has numerous moving parts and it required multiple follow-ups to add lost unit tests.
   
   Hopefully the lessons learned from this codec version "bump" will help others for the next time, whenever that may be.
   
   Starting this is a draft PR since I am not sure that I am using the correct Lucene terminology, best practices, style, language, etc.
   
   Suggestions and edits welcome :D
   
   Closes https://github.com/apache/lucene/issues/12918.


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "shubhamvishu (via GitHub)" <gi...@apache.org>.
shubhamvishu commented on code in PR #12930:
URL: https://github.com/apache/lucene/pull/12930#discussion_r1462857551


##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.
+  * Copy the previous codec in, updating all references to the old version number.
+  * Set the new codec, as the `defaultCodec` in [Codec.java](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/Codec.java).
+  * Update all references from the old codec version to the new one.
+* Fork Components:
+  * Fork the required codec components, ensure the new codec is using those components.
+  * Fork subclasses impacted by the codec changes and update version numbers accordingly.
+* ForUtil (if modified):
+  * Move the unmodified `gen_ForUtil.py` to the latest `backward_codecs` package. Move the modified `gen_ForUtil.py` to the newly forked codec package.
+  * Change the [generateForUtil.json](https://github.com/apache/lucene/blob/main/lucene/core/src/generated/checksums/generateForUtil.json) to use the newest `luceneXXX` package. Create a [generateForUtilXXX.json](https://github.com/apache/lucene/tree/main/lucene/backward-codecs/src/generated/checksums) for the `gen_ForUtil.py` moved to `backwards_codecs`.
+  * In [forUtil.gradle](https://github.com/apache/lucene/blob/main/gradle/generation/forUtil.gradle), change the genDir to the latest 
+    codec. Create a new task to `generateForUtil` for the `ForUtil` in `backwards_codecs`.
+  * Generate the `ForUtil`'s by running the command : `./gradlew generateForUtil`.
+
+### Move original files to backwards_codecs
+* Deprecate previous Codec:
+  * Create a new package for the previous codec of version XXX: `org.apache.lucene.backward_codecs.luceneXXX.LuceneXXXCodec`.

Review Comment:
   Are we creating a new package or you mean a new class eg: `LuceneXXXCodec` with old codec as specified here?



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "shubhamvishu (via GitHub)" <gi...@apache.org>.
shubhamvishu commented on code in PR #12930:
URL: https://github.com/apache/lucene/pull/12930#discussion_r1426159471


##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.
+  * Copy the previous codec in, updating all references to the old version number.
+  * Set the new codec, as the `defaultCodec` in [Codec.java](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/Codec.java).
+  * Update all references from the old codec version to the new one.
+* Fork Components:
+  * Fork the required codec components, ensure the new codec is using those components.
+  * Fork subclasses impacted by the codec changes and update version numbers accordingly.
+* ForUtil (if modified):
+  * Move the unmodified `gen_ForUtil.py` to the latest `backward_codecs` package. Move the modified `gen_ForUtil.py` to the newly forked codec package.
+  * Change the [generateForUtil.json](https://github.com/apache/lucene/blob/main/lucene/core/src/generated/checksums/generateForUtil.json) to use the newest `luceneXXX` package. Create a [generateForUtilXXX.json](https://github.com/apache/lucene/tree/main/lucene/backward-codecs/src/generated/checksums) for the `gen_ForUtil.py` moved to `backwards_codecs`.
+  * In [forUtil.gradle](https://github.com/apache/lucene/blob/main/gradle/generation/forUtil.gradle), change the genDir to the latest 
+    codec. Create a new task to `generateForUtil` for the `ForUtil` in `backwards_codecs`.
+  * Generate the `ForUtil`'s by running the command : `./gradlew generateForUtil`.
+
+### Move original files to backwards_codecs
+* Deprecate previous Codec:
+  * Create a new package for the previous codec of version XXX: `org.apache.lucene.backward_codecs.luceneXXX.LuceneXXXCodec`.
+* Move the original copy of other files that are to be modified to the new `backwards_codecs` package:
+  * Make them read-only where possible. e.g. in `LuceneXXXPostingsFormat`, remove instantiation of `LuceneXXXPostingsWriter`.
+  * Where it exists, increment the `VERSION_CURRENT` variable.
+
+### Unit tests
+* The codec version changes to it's unit tests follow a similar structure to the non-test code.

Review Comment:
   ```suggestion
   * The codec version changes to it's unit tests follow a similar structure to the source code.
   ```



##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.
+  * Copy the previous codec in, updating all references to the old version number.
+  * Set the new codec, as the `defaultCodec` in [Codec.java](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/Codec.java).
+  * Update all references from the old codec version to the new one.
+* Fork Components:
+  * Fork the required codec components, ensure the new codec is using those components.
+  * Fork subclasses impacted by the codec changes and update version numbers accordingly.
+* ForUtil (if modified):
+  * Move the unmodified `gen_ForUtil.py` to the latest `backward_codecs` package. Move the modified `gen_ForUtil.py` to the newly forked codec package.
+  * Change the [generateForUtil.json](https://github.com/apache/lucene/blob/main/lucene/core/src/generated/checksums/generateForUtil.json) to use the newest `luceneXXX` package. Create a [generateForUtilXXX.json](https://github.com/apache/lucene/tree/main/lucene/backward-codecs/src/generated/checksums) for the `gen_ForUtil.py` moved to `backwards_codecs`.
+  * In [forUtil.gradle](https://github.com/apache/lucene/blob/main/gradle/generation/forUtil.gradle), change the genDir to the latest 
+    codec. Create a new task to `generateForUtil` for the `ForUtil` in `backwards_codecs`.
+  * Generate the `ForUtil`'s by running the command : `./gradlew generateForUtil`.
+
+### Move original files to backwards_codecs
+* Deprecate previous Codec:
+  * Create a new package for the previous codec of version XXX: `org.apache.lucene.backward_codecs.luceneXXX.LuceneXXXCodec`.
+* Move the original copy of other files that are to be modified to the new `backwards_codecs` package:
+  * Make them read-only where possible. e.g. in `LuceneXXXPostingsFormat`, remove instantiation of `LuceneXXXPostingsWriter`.
+  * Where it exists, increment the `VERSION_CURRENT` variable.
+
+### Unit tests
+* The codec version changes to it's unit tests follow a similar structure to the non-test code.
+* Move existing test files related to forked files to the `backward_codecs` package.
+* Create RW forks of the required `backwards_codecs` components (otherwise we cannot test writing to `backwards_codecs`) for use in 
+  backwards compatibility unit tests (the ones moved to backward_codecs). Copy previous implementations of the RW classes and update with the 
+  formats used in that specific codec. Use the RW components in test cases of relevant codecs. 
+* Create a new `test.org.apache.lucene.backward_codecs.luceneXXX` package and copy in unit tests for any forked codec components. Modify 

Review Comment:
   Should this step of new java package creation moved up. Not sure.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "slow-J (via GitHub)" <gi...@apache.org>.
slow-J commented on code in PR #12930:
URL: https://github.com/apache/lucene/pull/12930#discussion_r1426770295


##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.
+  * Copy the previous codec in, updating all references to the old version number.
+  * Set the new codec, as the `defaultCodec` in [Codec.java](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/Codec.java).
+  * Update all references from the old codec version to the new one.
+* Fork Components:
+  * Fork the required codec components, ensure the new codec is using those components.
+  * Fork subclasses impacted by the codec changes and update version numbers accordingly.
+* ForUtil (if modified):
+  * Move the unmodified `gen_ForUtil.py` to the latest `backward_codecs` package. Move the modified `gen_ForUtil.py` to the newly forked codec package.
+  * Change the [generateForUtil.json](https://github.com/apache/lucene/blob/main/lucene/core/src/generated/checksums/generateForUtil.json) to use the newest `luceneXXX` package. Create a [generateForUtilXXX.json](https://github.com/apache/lucene/tree/main/lucene/backward-codecs/src/generated/checksums) for the `gen_ForUtil.py` moved to `backwards_codecs`.
+  * In [forUtil.gradle](https://github.com/apache/lucene/blob/main/gradle/generation/forUtil.gradle), change the genDir to the latest 
+    codec. Create a new task to `generateForUtil` for the `ForUtil` in `backwards_codecs`.
+  * Generate the `ForUtil`'s by running the command : `./gradlew generateForUtil`.
+
+### Move original files to backwards_codecs
+* Deprecate previous Codec:
+  * Create a new package for the previous codec of version XXX: `org.apache.lucene.backward_codecs.luceneXXX.LuceneXXXCodec`.
+* Move the original copy of other files that are to be modified to the new `backwards_codecs` package:
+  * Make them read-only where possible. e.g. in `LuceneXXXPostingsFormat`, remove instantiation of `LuceneXXXPostingsWriter`.
+  * Where it exists, increment the `VERSION_CURRENT` variable.
+
+### Unit tests
+* The codec version changes to it's unit tests follow a similar structure to the non-test code.
+* Move existing test files related to forked files to the `backward_codecs` package.
+* Create RW forks of the required `backwards_codecs` components (otherwise we cannot test writing to `backwards_codecs`) for use in 
+  backwards compatibility unit tests (the ones moved to backward_codecs). Copy previous implementations of the RW classes and update with the 
+  formats used in that specific codec. Use the RW components in test cases of relevant codecs. 
+* Create a new `test.org.apache.lucene.backward_codecs.luceneXXX` package and copy in unit tests for any forked codec components. Modify 

Review Comment:
   I wanted the unit tests logically separated from the rest of the upgrade since it involves some unrelated changes. Where do you think it should go?



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12930:
URL: https://github.com/apache/lucene/pull/12930#issuecomment-1933151288

   This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12930:
URL: https://github.com/apache/lucene/pull/12930#issuecomment-1899421572

   This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "shubhamvishu (via GitHub)" <gi...@apache.org>.
shubhamvishu commented on code in PR #12930:
URL: https://github.com/apache/lucene/pull/12930#discussion_r1462861811


##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.

Review Comment:
   How about writing this how-to with the idea of changing the codec version from `LuceneXY` to `LuceneXZ` (?), that way I believe it'll be more clear to understand which codec is referenced in as opposed to writing LuceneXXX or saying old vs new. What do you think?



##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.

Review Comment:
   How about writing this how-to with the idea of changing the codec version from `LuceneXY` to `LuceneXZ` (?), that way I believe it'll be more clear to understand which codec is referenced in as opposed to writing `LuceneXXX` or saying old vs new. What do you think?



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "slow-J (via GitHub)" <gi...@apache.org>.
slow-J commented on code in PR #12930:
URL: https://github.com/apache/lucene/pull/12930#discussion_r1490898433


##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.
+  * Copy the previous codec in, updating all references to the old version number.
+  * Set the new codec, as the `defaultCodec` in [Codec.java](https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/codecs/Codec.java).
+  * Update all references from the old codec version to the new one.
+* Fork Components:
+  * Fork the required codec components, ensure the new codec is using those components.
+  * Fork subclasses impacted by the codec changes and update version numbers accordingly.
+* ForUtil (if modified):
+  * Move the unmodified `gen_ForUtil.py` to the latest `backward_codecs` package. Move the modified `gen_ForUtil.py` to the newly forked codec package.
+  * Change the [generateForUtil.json](https://github.com/apache/lucene/blob/main/lucene/core/src/generated/checksums/generateForUtil.json) to use the newest `luceneXXX` package. Create a [generateForUtilXXX.json](https://github.com/apache/lucene/tree/main/lucene/backward-codecs/src/generated/checksums) for the `gen_ForUtil.py` moved to `backwards_codecs`.
+  * In [forUtil.gradle](https://github.com/apache/lucene/blob/main/gradle/generation/forUtil.gradle), change the genDir to the latest 
+    codec. Create a new task to `generateForUtil` for the `ForUtil` in `backwards_codecs`.
+  * Generate the `ForUtil`'s by running the command : `./gradlew generateForUtil`.
+
+### Move original files to backwards_codecs
+* Deprecate previous Codec:
+  * Create a new package for the previous codec of version XXX: `org.apache.lucene.backward_codecs.luceneXXX.LuceneXXXCodec`.

Review Comment:
   Sorry, I meant class, will change.



##########
dev-docs/codec-version-bump-howto.md:
##########
@@ -0,0 +1,74 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# Lucene Codec Version Bump How-To Manual
+
+Changing the name of the codec in Lucene is required for maintaining backward compatibility and ensuring a smooth transition for users. 
+Through explicit versioning, we isolate changes to the codec, and prevent unintended interactions between different codec 
+versions. Changes to the codec format version serves as a signal that a change in the format or structure of the index has occurred.
+
+This manual provides a step-by-step guide through the process of "bumping" the version of the Lucene Codec.
+
+### Fork and modify files
+* Creating a new Codec:
+  * Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.

Review Comment:
   Great idea! Will do this now. Also sorry for the delay, this work fell off my radar. Picking it back up.



-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Writing a HOWTO migrate codec version [lucene]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #12930:
URL: https://github.com/apache/lucene/pull/12930#issuecomment-1979853435

   This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!


-- 
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: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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