I have a table of movies in Cassandra (hosted on Astra DB), with a lone primary key of movie_id
. There are several columns, but for my vector search I really only care about the title
. The movie_vector
column has a storage attached index (SAI) on it, which was created with the following CQL:
CREATE CUSTOM INDEX ON movieapp.movies (movie_vector) USING 'StorageAttachedIndex';
When I execute a CQL vector search based on the vector defined for "Star Wars," I get these results:
SELECT title FROM movies
ORDER BY movie_vector ANN OF [37, 4, 8, 13, 42.1497, 8.1, 6778]
LIMIT 6;
title | movie_vector
-------------------------+-------------------------------------
Star Wars | [37, 4, 8, 13, 42.1497, 8.1, 6778]
The Empire Strikes Back | [37, 4, 8, 13, 19.47096, 8.2, 5998]
Return of the Jedi | [37, 4, 8, 13, 14.58609, 7.9, 4763]
The Lion King | [49, 1, 3, 7, 21.60576, 8, 5520]
Pocahontas | [10, 1, 3, 4, 13.28007, 6.7, 1509]
Batman | [18, 5, 8, 0, 19.10673, 7, 2145]
(6 rows)
How are these results sorted? Is there some way to see the logic behind that?