You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "mikemccand (via GitHub)" <gi...@apache.org> on 2026/01/20 14:04:22 UTC

Re: [I] Create a read-only index that drops index files not needed for searching [lucene]

mikemccand commented on issue #13158:
URL: https://github.com/apache/lucene/issues/13158#issuecomment-3773048389

   Maybe we could separate the two changes?  First, improve `KNNVectorsWriter` to always also write empty full precision vector files -- they are tiny.  Then at least the hack (picking which file to replicate) is somewhat less dreadful?  Then as follow-on we could work towards a clean API for Lucene users to express this at a clean API (no replication hacks).
   
   > what would happen if updates are made to the index configured with such a Codec?
   
   I think we could add some safety here (if the hack had bugs or so): `KnnVectorsWriter` merging could refuse to merge segments that are missing their full precision vectors.  This way if a user replicates the index dropping full precision vectors, and then attempts to append to that index, they would at least see exceptions at merge time.  Or maybe we could add a check on `IndexWriter` ctor that no segment X field is missing its full precision vectors?


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