Skip to content

Commit e5c58b1

Browse files
authored
Merge pull request #124 from FalkorDB/text_search_relations
update text indexing/search on edges
2 parents f8db84c + 9bd2fec commit e5c58b1

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

cypher/indexing.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,30 @@ 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 Full-Text indexing for Relation Labels
192+
To create a full-text index on the name property of all relations with the label Manager and enable phonetic search, use the following syntax:
193+
194+
195+
```sh
196+
GRAPH.QUERY DEMO_GRAPH "CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)"
197+
```
198+
## Querying with a Full-Text Index
199+
To search for specific words within the indexed relations, use:
200+
201+
202+
```sh
203+
GRAPH.QUERY DEMO_GRAPH
204+
"CALL db.idx.fulltext.queryRelations('Manager', 'Charlie Munger') YIELD relation RETURN relation.name"
205+
```
206+
207+
## Deleting a Full-Text Index
208+
To delete the full-text index for a specific relation label, use:
209+
210+
211+
```sh
212+
GRAPH.QUERY DEMO_GRAPH "CALL DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)"
213+
```
214+
191215
# Vector indexing
192216

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

0 commit comments

Comments
 (0)