raghavyadav01 commented on PR #20073: URL: https://github.com/apache/pinot/pull/20073#issuecomment-6487071871
cosineDistance re-reads every matched row's vector from the forward index and recomputes the distance. VECTOR_DISTANCE paired with VECTOR_SIMILARITY on the same column and vector takes the distances the HNSW search already computed, so those reads go away (3.4 ms vs 5.25 ms p50 in your benchmark). It also follows the column's configured metric, so it returns the same distance VECTOR_SIMILARITY ranks by, not always cosine. -- 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]
