hossman commented on issue #15292:
URL: https://github.com/apache/lucene/issues/15292#issuecomment-3900200843

   tomas pointed me to this issue in a recent mailing list thread where i 
proposed something similar...
   https://lists.apache.org/thread/zy0jlh3fgyc6dtk7m86gm7hv8hnxnf85
   
   I'm attaching a patch that shows my take on this idea -- and I'd like to 
clarify here why I think my idea is better then a simple `public static String 
getImplementationName()` is a good idea...
   
   ----
   
   In the linked PR, `getImplementationName()` returns the simple class name of 
the underlying IMPL -- meaning downstream applications that want to "do" 
something with this information would have to make conditional logic based on 
"known names" -- which then puts them (or us) in the position of thinking of 
"internal class names" as part of the "public API".
   
   Meaning that if/when we want to rename the `Panama*` classes because 
"Panama" is no longer an incubating feature of the JVM, we might break 
downstream applications making choices based on whether or not 
`VectorizationProvider.getImplementationName().startWith("Panama")` 
   
   ----
   
   I think it would be cleaner in the long run to have a `boolean isOptimize()` 
type method, along with a human readable `String getDescription()` type method 
that can let applications display/log about the implementation chosen based on 
the JVM/hardware; and separately the application can make "choices" based on 
whether the implementation is optimized (w/o needing to make any assumptions 
about the String value)
   
   From the email thread...
   
   > Example usages:
   > - Solr UI could display the VectorUtil description alng with basic 
   >   deployment details like solr & lucene version
   > - Solr UI could display a warning if your collection has DenseVector 
   >   fields in the schema but aren't using optimized VectorUtils
   > - Some other app (where vectors are critical) might want to fail fast on 
   >   startup if optimized VectorUtils aren't enabled
   > - etc.
   
   
[lucene.GH15292.vector.desc.and.isoptimized.introspection.patch](https://github.com/user-attachments/files/25308907/lucene.GH15292.vector.desc.and.isoptimized.introspection.patch)


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