diff --git a/pages/querying/_meta.json b/pages/querying/_meta.json index 50d8d594..4c97a6a7 100644 --- a/pages/querying/_meta.json +++ b/pages/querying/_meta.json @@ -8,6 +8,7 @@ "expressions": "Expressions", "schema": "Schema", "text-search": "Text search", + "vector-search": "Vector search", "time-to-live": "Time to live", "query-plan": "Query plan", "exploring-datasets": "Exploring datasets" diff --git a/pages/querying/vector-search.mdx b/pages/querying/vector-search.mdx new file mode 100644 index 00000000..c767cefa --- /dev/null +++ b/pages/querying/vector-search.mdx @@ -0,0 +1,67 @@ +--- +title: Vector search +description: Learn how to use vector search and manage vector indices in Memgraph. +--- + +import { Callout } from 'nextra/components' + +# Vector search + +TODO(gitbuda): Explain why and what? + +## Create vector indices + +Vector indices are created with the `CREATE VECTOR INDEX` command. You need to give +a name to the new index and specify which label and property it should apply to. + +```cypher +CREATE VECTOR INDEX vectorIndexName ON :Label(property) OPTIONS { config }; +``` + +If you attempt to create an index with an existing name, the statement will fail. + +## TODO(gitbuda): What is indexed and how? + +## Show vector indices + +To list all vector indices in Memgraph, use the `SHOW INDEX INFO` +[statement](/fundamentals/indexes#show-created-indexes). + +## TODO(gitbuda): Query vector indices + +``` +CALL vector_search.query_nodes('vectorIndexName', 10, [1.0, 2.0, ...]) +YIELD node, score +RETURN node, score; +``` + +## TODO(gitbuda): Import hints + +## Drop vector indices + +Vector indices are dropped with the `DROP VECTOR INDEX` command. You need to give +the name of the index to be deleted. + +This statement drops the vector index named `vectorIndexName`: + +```cypher +DROP VECTOR INDEX vectorIndexName; +``` + +If one attempts to delete an index with the same name twice, the statement will +fail. + +## Compatibility + +Vector search supports usage modalities that are available in Memgraph. Refer +to the table below for an overview: + +| Feature | Support | +|-------------------------|-----------| +| Multitenancy | todo | +| Durability | todo | +| Storage modes | todo | +| Replication | todo | +| Concurrent transactions | todo | + +## TODO(gitbuda): In-memory vs On-disk + memory vs time