benwtrent commented on issue #12627:
URL: https://github.com/apache/lucene/issues/12627#issuecomment-2033080335

   @msokolov in the HNSW codec, we do something like this already when 
gathering the underlying graph. 
   
   I would do something like:
   
   ```
    if (FilterLeafReader.unwrap(ctx.reader()) instanceof CodecReader 
codecReader) {
      KnnVectorsReader currKnnVectorsReader = codecReader.getVectorReader();
      if (currKnnVectorsReader instanceof PerFieldKnnVectorsFormat.FieldsReader 
perFields) {
        currKnnVectorsReader = perFields.get(vectorField);
      }
      if (currKnnVectorsReader instanceof HnswGraphProvider graphProvider) {
        if (HnswTestUtil.isFullyConnected(graphProvider.getGraph(vectorField)) 
== false) {
           // for now just bail out.
           return;
        }
      }
    }
   ```


-- 
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-unsubscr...@lucene.apache.org

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


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

Reply via email to