Skip to content

Commit

Permalink
Merge pull request #217 from neo4j/backport/7.x/pr-182
Browse files Browse the repository at this point in the history
[Cherry-pick][7.x] Merge pull request #182 from neo4j/update-vector-docs
  • Loading branch information
rsill-neo4j authored Nov 7, 2024
2 parents d1f6b05 + 50d61b5 commit caca276
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
4 changes: 2 additions & 2 deletions modules/ROOT/pages/directives/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Particularly useful for types that are not correctly pluralized or are non-Engli
| Indicates that there should be a uniqueness constraint in the database for the fields that it is applied to.

| xref::/directives/indexes-and-constraints.adoc#_vector_index_search[`@vector`]
| Perform a vector index search on your database either based by passing in a vector index or a search phrase. label:beta[]
| Perform a vector index search on your database either based by passing in a vector index or a search phrase.

|===

Expand Down Expand Up @@ -149,4 +149,4 @@ of any required fields that is passed as arguments to the custom resolver.
| xref:/integrations/relay-compatibility.adoc[`@relayId`]
| Specifies that the field should be used as the global node identifier for Relay.

|===
|===
33 changes: 14 additions & 19 deletions modules/ROOT/pages/directives/indexes-and-constraints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ await neoSchema.assertIndexesAndConstraints();

:description: Directives related to generative AI in the Neo4j GraphQL Library.

[role=label--beta]
== Vector index search

With the `@vector` GraphQL directive you can query your database to perform a vector index search.
Expand Down Expand Up @@ -331,15 +330,13 @@ This defines the query to be performed on all `Product` nodes which have a vecto
----
query FindSimilarProducts($vector: [Float]!) {
searchByDescription(vector: $vector) {
productsConnection {
edges {
cursor
score
node {
id
name
description
}
edges {
cursor
score
node {
id
name
description
}
}
}
Expand Down Expand Up @@ -415,15 +412,13 @@ This defines the query to be performed on all `Product` nodes which have a vecto
----
query SearchProductsByPhrase($phrase: String!) {
searchByPhrase(phrase: $phrase) {
productsConnection {
edges {
cursor
score
node {
id
name
description
}
edges {
cursor
score
node {
id
name
description
}
}
}
Expand Down

0 comments on commit caca276

Please sign in to comment.