Slide 16
Slide 16 text
Create and query vector index
CALL db.index.vector.createNodeIndex('spring-ai-document-index', 'Review',
'embedding', 1536, 'cosine');
CALL db.index.vector.queryNodes('spring-ai-document-index', 10,
$queryVector)
YIELD node AS similarReviews, score
MATCH (similarReviews)-[:WRITTEN_FOR]->(b:Book)
RETURN b.title as title, avg(score) AS score
ORDER BY score DESC LIMIT 10