adelapena commented on code in PR #2673:
URL: https://github.com/apache/cassandra/pull/2673#discussion_r1342846250


##########
src/java/org/apache/cassandra/index/sai/IndexContext.java:
##########
@@ -354,6 +371,11 @@ public boolean isLiteral()
         return TypeUtil.isLiteral(getValidator());
     }
 
+    public boolean isVector()
+    {
+        return getValidator().isVector() && 
((VectorType<?>)getValidator()).elementType instanceof FloatType;

Review Comment:
   At the moment if an index is created on a vector column the type of the 
created index will depend on the type of  the vector elements. If the vector is 
made of floats we will create and ANN index that doesn't support equality 
restrictions. If the vector is made of any other thing we wil create a literal 
index that does support equalities.
   
   I think this might be a bit confussing for users. They will be able to build 
indexes for equalities on any kind of vectors but float vectors. I guess we 
could:
   
   1. Forbid SAI indexes in non-float vectors, so vectors are always indexed by 
ANN if ANN supports their element type (float)
   2. Vectors are indexed as literals by default, unless some syntax or index 
property indicates that they should be indexed by ANN.
   
   wdyt?



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