Skip to content

Commit bd80458

Browse files
committed
update text indexing/search on edges
1 parent a9db97e commit bd80458

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

cypher/indexing.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,31 @@ For a node label, the full-text index deletion syntax is:
188188
GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.drop('Movie')"
189189
```
190190

191+
## Creating a full-text index for a relation label
192+
193+
To construct a full-text index on the `name` property with phonetic search of all relations with label `Manager`, use the syntax:
194+
195+
```sh
196+
GRAPH.QUERY DEMO_GRAPH "CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)"
197+
```
198+
199+
## Utilizing a full-text index for a relation label
200+
201+
An index can be invoked to match any whole words contained within:
202+
203+
```sh
204+
GRAPH.QUERY DEMO_GRAPH
205+
"CALL db.idx.fulltext.queryRelations('Manager', 'Charlie Munger') YIELD relation RETURN relation.name"
206+
```
207+
208+
## Deleting a full-text index for a relation label
209+
210+
For a relation label, the full-text index deletion syntax is:
211+
212+
```sh
213+
GRAPH.QUERY DEMO_GRAPH "CALL DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)"
214+
```
215+
191216
# Vector indexing
192217

193218
With the introduction of the `vector` data-type a new type of index was introduced.

0 commit comments

Comments
 (0)