uschindler commented on PR #15341:
URL: https://github.com/apache/lucene/pull/15341#issuecomment-3714801947

   Anyways, I think we should just add a special case based on the filename 
here: 
https://github.com/apache/lucene/blob/f996e744c1787da16454777a4dadc2f3cd2fac0a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundFormat.java#L123-L124
   
   Maybe add a method to the CFS writer:
   ```java
   protected void getFileAlignment(String fn) {
     return fn.endsWith(".vec") ? 64 : Long.BYTES;
   }
   
   // in code @ 
https://github.com/apache/lucene/blob/f996e744c1787da16454777a4dadc2f3cd2fac0a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/Lucene90CompoundFormat.java#L123-L124
       for (SizedFile sizedFile : files) {
         String file = sizedFile.name;
         // align file start offset
         long startOffset = data.alignFilePointer(getFileAlignment(file));
         // write bytes for file
   
   ```
   
   We can improve later. This does not need to be a new format version, as it 
does not change the file fomat itsself, so its backwards compatible. We just 
add a gap when writing VEC files.


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