# Table of Contents - [ACL | FalkorDB Docs](#acl-falkordb-docs) - [bitwise.and | FalkorDB Docs](#bitwise-and-falkordb-docs) - [AG2 | FalkorDB Docs](#ag2-falkordb-docs) - [Betweenness Centrality | FalkorDB Docs](#betweenness-centrality-falkordb-docs) - [BFS | FalkorDB Docs](#bfs-falkordb-docs) - [BOLT protocol support | FalkorDB Docs](#bolt-protocol-support-falkordb-docs) - [Building Docker | FalkorDB Docs](#building-docker-falkordb-docs) - [GRAPH.BULK endpoint specification | FalkorDB Docs](#graph-bulk-endpoint-specification-falkordb-docs) - [CALL | FalkorDB Docs](#call-falkordb-docs) - [text.camelCase | FalkorDB Docs](#text-camelcase-falkordb-docs) - [text.capitalize | FalkorDB Docs](#text-capitalize-falkordb-docs) - [Chat Panel | FalkorDB Docs](#chat-panel-falkordb-docs) - [Community Detection using Label Propagation (CDLP) | FalkorDB Docs](#community-detection-using-label-propagation-cdlp-falkordb-docs) - [CREATE | FalkorDB Docs](#create-falkordb-docs) - [Cluster | FalkorDB Docs](#cluster-falkordb-docs) - [Configuration | FalkorDB Docs](#configuration-falkordb-docs) - [Data / Property Panel | FalkorDB Docs](#data-property-panel-falkordb-docs) - [Docker Deployment | FalkorDB Docs](#docker-deployment-falkordb-docs) - [DELETE | FalkorDB Docs](#delete-falkordb-docs) - [Configuration | FalkorDB Docs](#configuration-falkordb-docs) - [text.decapitalize | FalkorDB Docs](#text-decapitalize-falkordb-docs) - [Data types | FalkorDB Docs](#data-types-falkordb-docs) - [Cognee | FalkorDB Docs](#cognee-falkordb-docs) - [Features | FalkorDB Docs](#features-falkordb-docs) - [Enterprise Tier | FalkorDB Docs](#enterprise-tier-falkordb-docs) - [FalkorDBLite (TypeScript) | FalkorDB Docs](#falkordblite-typescript-falkordb-docs) - [FOREACH | FalkorDB Docs](#foreach-falkordb-docs) - [Free Tier | FalkorDB Docs](#free-tier-falkordb-docs) - [text.format | FalkorDB Docs](#text-format-falkordb-docs) - [date.format | FalkorDB Docs](#date-format-falkordb-docs) - [Client Libraries | FalkorDB Docs](#client-libraries-falkordb-docs) - [json.fromJsonList | FalkorDB Docs](#json-fromjsonlist-falkordb-docs) - [json.fromJsonMap | FalkorDB Docs](#json-fromjsonmap-falkordb-docs) - [coll.frequencies | FalkorDB Docs](#coll-frequencies-falkordb-docs) - [Main Graph Canvas | FalkorDB Docs](#main-graph-canvas-falkordb-docs) - [Client Specification | FalkorDB Docs](#client-specification-falkordb-docs) - [map.fromPairs | FalkorDB Docs](#map-frompairs-falkordb-docs) - [Cypher coverage | FalkorDB Docs](#cypher-coverage-falkordb-docs) - [Graph Page (Layout) | FalkorDB Docs](#graph-page-layout-falkordb-docs) - [Graph Info Panel | FalkorDB Docs](#graph-info-panel-falkordb-docs) - [GRAPH.EXPLAIN | FalkorDB Docs](#graph-explain-falkordb-docs) - [GRAPH.DELETE | FalkorDB Docs](#graph-delete-falkordb-docs) - [GRAPH.INFO | FalkorDB Docs](#graph-info-falkordb-docs) - [GRAPH.COPY | FalkorDB Docs](#graph-copy-falkordb-docs) - [GRAPH.CONFIG-SET | FalkorDB Docs](#graph-config-set-falkordb-docs) - [GRAPH.MEMORY | FalkorDB Docs](#graph-memory-falkordb-docs) - [GRAPH.LIST | FalkorDB Docs](#graph-list-falkordb-docs) - [GRAPH.SLOWLOG | FalkorDB Docs](#graph-slowlog-falkordb-docs) - [GraphRAG Toolkit | FalkorDB Docs](#graphrag-toolkit-falkordb-docs) - [GenAI Tools | FalkorDB Docs](#genai-tools-falkordb-docs) - [UI Elements | FalkorDB Docs](#ui-elements-falkordb-docs) - [Full-text Index | FalkorDB Docs](#full-text-index-falkordb-docs) - [MCP Server | FalkorDB Docs](#mcp-server-falkordb-docs) - [Functions | FalkorDB Docs](#functions-falkordb-docs) - [Migration | FalkorDB Docs](#migration-falkordb-docs) - [GraphRAG-SDK | FalkorDB Docs](#graphrag-sdk-falkordb-docs) - [GRAPH.RO_QUERY | FalkorDB Docs](#graph-ro-query-falkordb-docs) - [Cloud DBaaS | FalkorDB Docs](#cloud-dbaas-falkordb-docs) - [Agentic Memory | FalkorDB Docs](#agentic-memory-falkordb-docs) - [Browser | FalkorDB Docs](#browser-falkordb-docs) - [The FalkorDB Design | FalkorDB Docs](#the-falkordb-design-falkordb-docs) - [Graphiti | FalkorDB Docs](#graphiti-falkordb-docs) - [Commands | FalkorDB Docs](#commands-falkordb-docs) - [References | FalkorDB Docs](#references-falkordb-docs) - [Integration | FalkorDB Docs](#integration-falkordb-docs) - [Map Functions | FalkorDB Docs](#map-functions-falkordb-docs) - [Algorithms | FalkorDB Docs](#algorithms-falkordb-docs) - [Similarity Functions | FalkorDB Docs](#similarity-functions-falkordb-docs) - [Collection Functions | FalkorDB Docs](#collection-functions-falkordb-docs) - [Text Functions | FalkorDB Docs](#text-functions-falkordb-docs) - [Date Functions | FalkorDB Docs](#date-functions-falkordb-docs) - [JSON Functions | FalkorDB Docs](#json-functions-falkordb-docs) - [Bitwise Functions | FalkorDB Docs](#bitwise-functions-falkordb-docs) - [GRAPH.CONFIG-GET | FalkorDB Docs](#graph-config-get-falkordb-docs) - [GRAPH.CONSTRAINT DROP | FalkorDB Docs](#graph-constraint-drop-falkordb-docs) - [text.indexOf | FalkorDB Docs](#text-indexof-falkordb-docs) - [sim.jaccard | FalkorDB Docs](#sim-jaccard-falkordb-docs) - [text.indexesOf | FalkorDB Docs](#text-indexesof-falkordb-docs) - [coll.intersection | FalkorDB Docs](#coll-intersection-falkordb-docs) - [text.jaroWinkler | FalkorDB Docs](#text-jarowinkler-falkordb-docs) - [Apache Jena | FalkorDB Docs](#apache-jena-falkordb-docs) - [Known limitations | FalkorDB Docs](#known-limitations-falkordb-docs) - [FLEX Function Reference | FalkorDB Docs](#flex-function-reference-falkordb-docs) - [text.join | FalkorDB Docs](#text-join-falkordb-docs) - [LIMIT | FalkorDB Docs](#limit-falkordb-docs) - [FalkorDB License | FalkorDB Docs](#falkordb-license-falkordb-docs) - [text.levenshtein | FalkorDB Docs](#text-levenshtein-falkordb-docs) - [Kubernetes support | FalkorDB Docs](#kubernetes-support-falkordb-docs) - [GRAPH.CONSTRAINT CREATE | FalkorDB Docs](#graph-constraint-create-falkordb-docs) - [Kafka Connect Sink | FalkorDB Docs](#kafka-connect-sink-falkordb-docs) - [Login Screen | FalkorDB Docs](#login-screen-falkordb-docs) - [MATCH | FalkorDB Docs](#match-falkordb-docs) - [Navigation & Header | FalkorDB Docs](#navigation-header-falkordb-docs) - [Metadata View | FalkorDB Docs](#metadata-view-falkordb-docs) - [MERGE | FalkorDB Docs](#merge-falkordb-docs) - [map.merge | FalkorDB Docs](#map-merge-falkordb-docs) - [LOAD CSV | FalkorDB Docs](#load-csv-falkordb-docs) - [text.lpad | FalkorDB Docs](#text-lpad-falkordb-docs) - [LlamaIndex | FalkorDB Docs](#llamaindex-falkordb-docs) - [ORDER BY | FalkorDB Docs](#order-by-falkordb-docs) - [bitwise.not | FalkorDB Docs](#bitwise-not-falkordb-docs) - [MSF | FalkorDB Docs](#msf-falkordb-docs) - [LangGraph | FalkorDB Docs](#langgraph-falkordb-docs) - [bitwise.or | FalkorDB Docs](#bitwise-or-falkordb-docs) - [LangChain | FalkorDB Docs](#langchain-falkordb-docs) - [PageRank | FalkorDB Docs](#pagerank-falkordb-docs) - [OPTIONAL MATCH | FalkorDB Docs](#optional-match-falkordb-docs) - [Query Editor | FalkorDB Docs](#query-editor-falkordb-docs) - [date.parse | FalkorDB Docs](#date-parse-falkordb-docs) - [UDFs | FalkorDB Docs](#udfs-falkordb-docs) - [Durability | FalkorDB Docs](#durability-falkordb-docs) - [REMOVE | FalkorDB Docs](#remove-falkordb-docs) - [Quick Start | FalkorDB Docs](#quick-start-falkordb-docs) - [RedisGraph to FalkorDB | FalkorDB Docs](#redisgraph-to-falkordb-falkordb-docs) - [text.regexGroups | FalkorDB Docs](#text-regexgroups-falkordb-docs) - [map.removeKey | FalkorDB Docs](#map-removekey-falkordb-docs) - [Query History | FalkorDB Docs](#query-history-falkordb-docs) - [Pro Tier | FalkorDB Docs](#pro-tier-falkordb-docs) - [Railway | FalkorDB Docs](#railway-falkordb-docs) - [OpenTelemetry Integration | FalkorDB Docs](#opentelemetry-integration-falkordb-docs) - [text.repeat | FalkorDB Docs](#text-repeat-falkordb-docs) - [text.replace | FalkorDB Docs](#text-replace-falkordb-docs) - [KubeBlocks | FalkorDB Docs](#kubeblocks-falkordb-docs) - [map.removeKeys | FalkorDB Docs](#map-removekeys-falkordb-docs) - [Getting Started | FalkorDB Docs](#getting-started-falkordb-docs) - [Mem0 | FalkorDB Docs](#mem0-falkordb-docs) - [SET | FalkorDB Docs](#set-falkordb-docs) - [text.rpad | FalkorDB Docs](#text-rpad-falkordb-docs) - [RETURN | FalkorDB Docs](#return-falkordb-docs) - [SKIP | FalkorDB Docs](#skip-falkordb-docs) - [Settings Page | FalkorDB Docs](#settings-page-falkordb-docs) - [bitwise.shiftLeft | FalkorDB Docs](#bitwise-shiftleft-falkordb-docs) - [bitwise.shiftRight | FalkorDB Docs](#bitwise-shiftright-falkordb-docs) - [coll.shuffle | FalkorDB Docs](#coll-shuffle-falkordb-docs) - [text.snakeCase | FalkorDB Docs](#text-snakecase-falkordb-docs) - [Kuzu to FalkorDB | FalkorDB Docs](#kuzu-to-falkordb-falkordb-docs) - [FalkorDBLite (Python) | FalkorDB Docs](#falkordblite-python-falkordb-docs) - [Replication | FalkorDB Docs](#replication-falkordb-docs) - [algo.SPpaths | FalkorDB Docs](#algo-sppaths-falkordb-docs) - [algo.SSpaths | FalkorDB Docs](#algo-sspaths-falkordb-docs) - [Style Panel | FalkorDB Docs](#style-panel-falkordb-docs) - [Graph Toolbar & Element Actions | FalkorDB Docs](#graph-toolbar-element-actions-falkordb-docs) - [Table View | FalkorDB Docs](#table-view-falkordb-docs) - [Startup Tier | FalkorDB Docs](#startup-tier-falkordb-docs) - [Persistence on Docker | FalkorDB Docs](#persistence-on-docker-falkordb-docs) - [Result Set Structure | FalkorDB Docs](#result-set-structure-falkordb-docs) - [date.toTimeZone | FalkorDB Docs](#date-totimezone-falkordb-docs) - [text.swapCase | FalkorDB Docs](#text-swapcase-falkordb-docs) - [json.toJson | FalkorDB Docs](#json-tojson-falkordb-docs) - [map.submap | FalkorDB Docs](#map-submap-falkordb-docs) - [UNWIND | FalkorDB Docs](#unwind-falkordb-docs) - [UNION | FalkorDB Docs](#union-falkordb-docs) - [text.upperCamelCase | FalkorDB Docs](#text-uppercamelcase-falkordb-docs) - [coll.union | FalkorDB Docs](#coll-union-falkordb-docs) - [date.truncate | FalkorDB Docs](#date-truncate-falkordb-docs) - [Weakly Connected Components (WCC) | FalkorDB Docs](#weakly-connected-components-wcc-falkordb-docs) - [Range Index | FalkorDB Docs](#range-index-falkordb-docs) - [WHERE | FalkorDB Docs](#where-falkordb-docs) - [Graphiti MCP Server | FalkorDB Docs](#graphiti-mcp-server-falkordb-docs) - [Third Party | FalkorDB Docs](#third-party-falkordb-docs) - [SQL Sources to FalkorDB (Online Migration) | FalkorDB Docs](#sql-sources-to-falkordb-online-migration-falkordb-docs) - [WITH | FalkorDB Docs](#with-falkordb-docs) - [GRAPH.PROFILE | FalkorDB Docs](#graph-profile-falkordb-docs) - [bitwise.xor | FalkorDB Docs](#bitwise-xor-falkordb-docs) - [coll.zip | FalkorDB Docs](#coll-zip-falkordb-docs) - [Snowflake Integration | FalkorDB Docs](#snowflake-integration-falkordb-docs) - [Spring Data FalkorDB | FalkorDB Docs](#spring-data-falkordb-falkordb-docs) - [GRAPH.QUERY | FalkorDB Docs](#graph-query-falkordb-docs) - [RDF to FalkorDB | FalkorDB Docs](#rdf-to-falkordb-falkordb-docs) - [Vector Index | FalkorDB Docs](#vector-index-falkordb-docs) - [Lightning.AI | FalkorDB Docs](#lightning-ai-falkordb-docs) - [FalkorDBLite | FalkorDB Docs](#falkordblite-falkordb-docs) - [Docker and Docker Compose | FalkorDB Docs](#docker-and-docker-compose-falkordb-docs) - [Rest API | FalkorDB Docs](#rest-api-falkordb-docs) - [Indexing | FalkorDB Docs](#indexing-falkordb-docs) - [Neo4j to FalkorDB | FalkorDB Docs](#neo4j-to-falkordb-falkordb-docs) - [Home | FalkorDB Docs](#home-falkordb-docs) - [Procedures | FalkorDB Docs](#procedures-falkordb-docs) - [Operations | FalkorDB Docs](#operations-falkordb-docs) - [Cypher Language | FalkorDB Docs](#cypher-language-falkordb-docs) - [Redirecting…](#redirecting-) - [Redirecting…](#redirecting-) - [Redirecting…](#redirecting-) - [Redirecting…](#redirecting-) - [Redirecting…](#redirecting-) - [Client Specification | FalkorDB Docs](#client-specification-falkordb-docs) - [Client Libraries | FalkorDB Docs](#client-libraries-falkordb-docs) - [Persistence on Docker | FalkorDB Docs](#persistence-on-docker-falkordb-docs) - [Replication | FalkorDB Docs](#replication-falkordb-docs) - [Cluster | FalkorDB Docs](#cluster-falkordb-docs) - [Kubernetes support | FalkorDB Docs](#kubernetes-support-falkordb-docs) - [WHERE | FalkorDB Docs](#where-falkordb-docs) - [BFS | FalkorDB Docs](#bfs-falkordb-docs) - [RETURN | FalkorDB Docs](#return-falkordb-docs) - [ORDER BY | FalkorDB Docs](#order-by-falkordb-docs) - [MSF | FalkorDB Docs](#msf-falkordb-docs) - [KubeBlocks | FalkorDB Docs](#kubeblocks-falkordb-docs) - [SKIP | FalkorDB Docs](#skip-falkordb-docs) - [LIMIT | FalkorDB Docs](#limit-falkordb-docs) - [OpenTelemetry Integration | FalkorDB Docs](#opentelemetry-integration-falkordb-docs) - [Building Docker | FalkorDB Docs](#building-docker-falkordb-docs) - [CREATE | FalkorDB Docs](#create-falkordb-docs) - [Lightning.AI | FalkorDB Docs](#lightning-ai-falkordb-docs) - [MERGE | FalkorDB Docs](#merge-falkordb-docs) - [DELETE | FalkorDB Docs](#delete-falkordb-docs) - [UNION | FalkorDB Docs](#union-falkordb-docs) - [SET | FalkorDB Docs](#set-falkordb-docs) - [UNWIND | FalkorDB Docs](#unwind-falkordb-docs) - [WITH | FalkorDB Docs](#with-falkordb-docs) - [FOREACH | FalkorDB Docs](#foreach-falkordb-docs) - [CALL | FalkorDB Docs](#call-falkordb-docs) - [OPTIONAL MATCH | FalkorDB Docs](#optional-match-falkordb-docs) - [GraphRAG-SDK | FalkorDB Docs](#graphrag-sdk-falkordb-docs) - [Vector Index | FalkorDB Docs](#vector-index-falkordb-docs) - [Railway | FalkorDB Docs](#railway-falkordb-docs) - [FalkorDBLite (TypeScript) | FalkorDB Docs](#falkordblite-typescript-falkordb-docs) - [Durability | FalkorDB Docs](#durability-falkordb-docs) - [Cypher coverage | FalkorDB Docs](#cypher-coverage-falkordb-docs) - [GRAPH.EXPLAIN | FalkorDB Docs](#graph-explain-falkordb-docs) - [Functions | FalkorDB Docs](#functions-falkordb-docs) - [Procedures | FalkorDB Docs](#procedures-falkordb-docs) - [MATCH | FalkorDB Docs](#match-falkordb-docs) - [Full-text Index | FalkorDB Docs](#full-text-index-falkordb-docs) - [GRAPH.CONSTRAINT DROP | FalkorDB Docs](#graph-constraint-drop-falkordb-docs) - [Result Set Structure | FalkorDB Docs](#result-set-structure-falkordb-docs) - [REMOVE | FalkorDB Docs](#remove-falkordb-docs) - [Range Index | FalkorDB Docs](#range-index-falkordb-docs) - [GRAPH.CONSTRAINT CREATE | FalkorDB Docs](#graph-constraint-create-falkordb-docs) - [Configuration | FalkorDB Docs](#configuration-falkordb-docs) - [GRAPH.QUERY | FalkorDB Docs](#graph-query-falkordb-docs) - [FalkorDBLite (Python) | FalkorDB Docs](#falkordblite-python-falkordb-docs) - [Docker and Docker Compose | FalkorDB Docs](#docker-and-docker-compose-falkordb-docs) - [Home | FalkorDB Docs](#home-falkordb-docs) --- # ACL | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/acl.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/acl.html#acl) ACL ======================================================= The ACL command in FalkorDB provides tools for managing Access Control Lists, enabling administrators to control user permissions at a granular level. This command is crucial for maintaining secure access to your FalkorDB instances. Usage: `ACL [SUBCOMMAND] [arg1] [arg2] ...` [](https://docs.falkordb.com/commands/acl.html#subcommands) Subcommands ----------------------------------------------------------------------- ### [](https://docs.falkordb.com/commands/acl.html#acl-help) ACL HELP Returns a list of all available `ACL` subcommands and their syntax. Usage: `ACL HELP` #### [](https://docs.falkordb.com/commands/acl.html#example) Example > ACL HELP #### [](https://docs.falkordb.com/commands/acl.html#output) Output 1) "GETUSER" 2) "SETUSER" 3) "DELUSER" 4) "LIST" ... ### [](https://docs.falkordb.com/commands/acl.html#acl-setuser) ACL SETUSER Defines or updates a user’s permissions. Usage: `ACL SETUSER [rule1] [rule2] ...` #### [](https://docs.falkordb.com/commands/acl.html#rules) Rules * on / off: Enables or disables the user account. * nopass: Allows access without a password. * password:: Sets a password for the user. * ~: Restricts access to graphs matching the given pattern. * +: Grants permission to execute specific commands. * -: Denies permission to execute specific commands. #### [](https://docs.falkordb.com/commands/acl.html#example-1) Example > ACL SETUSER john on >password123 +GRAPH.LIST +GRAPH.RO_QUERY ~* ### [](https://docs.falkordb.com/commands/acl.html#acl-getuser) ACL GETUSER Retrieves details about a specific user, including permissions and settings. Syntax Usage: `ACL GETUSER ` #### [](https://docs.falkordb.com/commands/acl.html#example-2) Example > ACL GETUSER john #### [](https://docs.falkordb.com/commands/acl.html#output-1) Output 1) "on" 2) ">password123" 3) "+GRAPH.LIST" 4) "+GRAPH.RO_QUERY" 5) "~*" ### [](https://docs.falkordb.com/commands/acl.html#acl-deluser) ACL DELUSER Deletes a user from the ACL. Usage: `ACL DELUSER ` #### [](https://docs.falkordb.com/commands/acl.html#example-3) Example > ACL DELUSER john ### [](https://docs.falkordb.com/commands/acl.html#acl-list) ACL LIST Lists all users currently configured in the ACL. Usage: `ACL LIST` #### [](https://docs.falkordb.com/commands/acl.html#example-4) Example > ACL LIST #### [](https://docs.falkordb.com/commands/acl.html#output-2) Output 1) "admin" 2) "john" 3) "guest" ### [](https://docs.falkordb.com/commands/acl.html#acl-log) ACL LOG Displays a log of recent ACL-related events, such as user authentication attempts or rule changes. Usage: `ACL LOG [count]` * count: (Optional) Limits the number of entries in the log. #### [](https://docs.falkordb.com/commands/acl.html#example-5) Example > ACL LOG 10 [](https://docs.falkordb.com/commands/acl.html#notes) Notes ----------------------------------------------------------- The ACL command is available only to users with administrative privileges. Be cautious when using the nopass rule, as it may compromise security. Use specific patterns and commands to enforce the principle of least privilege. * * * --- # bitwise.and | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/bitwise/and.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#bitwiseand) bitwise.and =============================================================================== [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#description) Description -------------------------------------------------------------------------------- Performs a bitwise AND operation on two integers. Each bit in the result is 1 only if the corresponding bits in both operands are 1. [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#syntax) Syntax ---------------------------------------------------------------------- flex.bitwise.and(a, b) [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#parameters) Parameters ------------------------------------------------------------------------------ | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `a` | number (integer) | Yes | First operand | | `b` | number (integer) | Yes | Second operand | [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#returns) Returns ------------------------------------------------------------------------ **Type:** number (integer) The result of the bitwise AND operation. [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#examples) Examples -------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#example-1-basic-and-operation) Example 1: Basic AND Operation RETURN flex.bitwise.and(12, 10) AS result **Output:** result ------ 8 (Binary: 1100 AND 1010 = 1000 = 8) ### [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#example-2-checking-permission-flags) Example 2: Checking Permission Flags WITH 7 AS userPermissions // 0111 (read=1, write=2, execute=4) WITH userPermissions, 2 AS writeFlag RETURN flex.bitwise.and(userPermissions, writeFlag) > 0 AS hasWrite ### [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#example-3-masking-bits) Example 3: Masking Bits MATCH (d:Device) WITH d, flex.bitwise.and(d.flags, 15) AS lowerNibble RETURN d.id, lowerNibble [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#notes) Notes -------------------------------------------------------------------- * Operates on 32-bit signed integers in JavaScript * Both operands are converted to integers if needed * Commonly used for flag checking and bit masking [](https://docs.falkordb.com/udfs/flex/bitwise/and.html#see-also) See Also -------------------------------------------------------------------------- * [bitwise.or](https://docs.falkordb.com/udfs/flex/bitwise/or.html) - Bitwise OR operation * [bitwise.xor](https://docs.falkordb.com/udfs/flex/bitwise/xor.html) - Bitwise XOR operation * [bitwise.not](https://docs.falkordb.com/udfs/flex/bitwise/not.html) - Bitwise NOT operation * * * --- # AG2 | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/ag2.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/ag2.html#ag2) AG2 ========================================================== [AG2](https://ag2.ai/) (formerly AutoGen) is an open-source agentic AI operating system (AgentOS) for building, orchestrating, and deploying multi-agent AI systems. Developed from OpenAI and Microsoft Research’s AutoGen, AG2 provides a modular framework for creating sophisticated AI agents that can collaborate, use tools, and integrate with knowledge graphs. The integration of AG2 with FalkorDB brings powerful GraphRAG capabilities to multi-agent systems, enabling agents to leverage structured knowledge graphs for more accurate, explainable, and contextually-aware responses. [](https://docs.falkordb.com/genai-tools/ag2.html#installation) Installation ---------------------------------------------------------------------------- Install AG2 with FalkorDB GraphRAG support: pip install -U ag2[openai,graph-rag-falkor-db] Or install the GraphRAG-SDK separately: pip install ag2 graphrag_sdk [](https://docs.falkordb.com/genai-tools/ag2.html#quick-start) Quick Start -------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/ag2.html#1-set-up-falkordb) 1\. Set Up FalkorDB Start FalkorDB using Docker: docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest Or use [FalkorDB Cloud](https://app.falkordb.cloud/) for a managed instance. ### [](https://docs.falkordb.com/genai-tools/ag2.html#2-configure-environment) 2\. Configure Environment Set up your API credentials: export FALKORDB_HOST="localhost" export FALKORDB_PORT=6379 export OPENAI_API_KEY="your-openai-api-key" ### [](https://docs.falkordb.com/genai-tools/ag2.html#3-create-a-graphrag-agent) 3\. Create a GraphRAG Agent import os from autogen import ConversableAgent from autogen.agentchat.contrib.graph_rag.document import Document, DocumentType from autogen.agentchat.contrib.graph_rag.falkor_graph_query_engine import ( FalkorGraphQueryEngine, ) from autogen.agentchat.contrib.graph_rag.falkor_graph_rag_capability import ( FalkorGraphRagCapability, ) # Specify input document to create knowledge graph input_documents = [\ Document(doctype=DocumentType.TEXT, path_or_url="company_data.txt")\ ] # Connect to FalkorDB and initialize knowledge graph query_engine = FalkorGraphQueryEngine( name="company_knowledge", host="localhost", port=6379, ) # Ingest documents into the knowledge graph query_engine.init_db(input_doc=input_documents) # Create AG2 agent agent = ConversableAgent( name="knowledge_agent", llm_config={"config_list": [{"model": "gpt-4", "api_key": os.getenv("OPENAI_API_KEY")}]}, human_input_mode="NEVER", ) # Attach GraphRAG capability to the agent FalkorGraphRagCapability.attach(agent, query_engine) # Query the knowledge graph response = agent.generate_reply( messages=[{"role": "user", "content": "Who is the CEO of the company?"}] ) print(response) [](https://docs.falkordb.com/genai-tools/ag2.html#advanced-usage) Advanced Usage -------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/ag2.html#multi-agent-collaboration) Multi-Agent Collaboration Build a multi-agent system where agents collaborate using shared knowledge: from autogen import ConversableAgent, GroupChat, GroupChatManager # Create multiple agents with different roles researcher = ConversableAgent( name="researcher", system_message="You are a research analyst. Extract and analyze information from the knowledge graph.", llm_config={"config_list": [{"model": "gpt-4", "api_key": os.getenv("OPENAI_API_KEY")}]}, ) planner = ConversableAgent( name="planner", system_message="You are a strategic planner. Use research findings to create actionable plans.", llm_config={"config_list": [{"model": "gpt-4", "api_key": os.getenv("OPENAI_API_KEY")}]}, ) critic = ConversableAgent( name="critic", system_message="You are a critical reviewer. Evaluate plans and provide constructive feedback.", llm_config={"config_list": [{"model": "gpt-4", "api_key": os.getenv("OPENAI_API_KEY")}]}, ) # Attach GraphRAG to all agents FalkorGraphRagCapability.attach(researcher, query_engine) FalkorGraphRagCapability.attach(planner, query_engine) FalkorGraphRagCapability.attach(critic, query_engine) # Create group chat groupchat = GroupChat( agents=[researcher, planner, critic], messages=[], max_round=10, ) manager = GroupChatManager(groupchat=groupchat, llm_config={"config_list": [{"model": "gpt-4"}]}) # Start the conversation researcher.initiate_chat( manager, message="Analyze our company's market position and suggest growth strategies.", ) ### [](https://docs.falkordb.com/genai-tools/ag2.html#building-knowledge-graphs-from-multiple-sources) Building Knowledge Graphs from Multiple Sources from autogen.agentchat.contrib.graph_rag.document import Document, DocumentType # Create documents from various sources documents = [\ Document(doctype=DocumentType.TEXT, path_or_url="product_catalog.txt"),\ Document(doctype=DocumentType.TEXT, path_or_url="customer_reviews.txt"),\ Document(doctype=DocumentType.TEXT, path_or_url="market_research.txt"),\ ] # Initialize query engine with multiple documents query_engine = FalkorGraphQueryEngine( name="business_intelligence", host="localhost", port=6379, ) query_engine.init_db(input_doc=documents) ### [](https://docs.falkordb.com/genai-tools/ag2.html#custom-query-engine-configuration) Custom Query Engine Configuration from autogen.agentchat.contrib.graph_rag.falkor_graph_query_engine import ( FalkorGraphQueryEngine, GraphStoreQueryResult, ) # Configure query engine with custom settings query_engine = FalkorGraphQueryEngine( name="custom_graph", host=os.getenv("FALKORDB_HOST", "localhost"), port=int(os.getenv("FALKORDB_PORT", 6379)), username=os.getenv("FALKORDB_USERNAME"), password=os.getenv("FALKORDB_PASSWORD"), ) # Query with custom Cypher cypher_query = """ MATCH (p:Person)-[:WORKS_AT]->(c:Company) WHERE c.industry = 'Technology' RETURN p.name, c.name, c.founded_year ORDER BY c.founded_year DESC LIMIT 10 """ result = query_engine.query(cypher_query) print(result) ### [](https://docs.falkordb.com/genai-tools/ag2.html#conversational-context-management) Conversational Context Management # Agent maintains context across multiple queries agent = ConversableAgent( name="contextual_agent", llm_config={"config_list": [{"model": "gpt-4", "api_key": os.getenv("OPENAI_API_KEY")}]}, human_input_mode="NEVER", ) FalkorGraphRagCapability.attach(agent, query_engine) # First question response1 = agent.generate_reply( messages=[{"role": "user", "content": "Tell me about TechCorp."}] ) # Follow-up question (agent remembers context) response2 = agent.generate_reply( messages=[{"role": "user", "content": "Who founded that company?"}] ) # Another follow-up response3 = agent.generate_reply( messages=[{"role": "user", "content": "What products do they make?"}] ) ### [](https://docs.falkordb.com/genai-tools/ag2.html#human-in-the-loop-workflows) Human-in-the-Loop Workflows # Create agent with human input for critical decisions human_agent = ConversableAgent( name="human_supervisor", human_input_mode="ALWAYS", llm_config=False, ) ai_agent = ConversableAgent( name="ai_assistant", system_message="You help humans make data-driven decisions using the knowledge graph.", llm_config={"config_list": [{"model": "gpt-4", "api_key": os.getenv("OPENAI_API_KEY")}]}, ) FalkorGraphRagCapability.attach(ai_agent, query_engine) # AI agent proposes, human approves ai_agent.initiate_chat( human_agent, message="Based on the knowledge graph, I recommend expanding into the European market. What do you think?", ) ### [](https://docs.falkordb.com/genai-tools/ag2.html#integrating-external-tools) Integrating External Tools from autogen import register_function # Define custom tools for agents def analyze_sentiment(text: str) -> str: """Analyze sentiment of text""" # Your sentiment analysis logic return "positive" def fetch_market_data(company: str) -> dict: """Fetch real-time market data""" # Your data fetching logic return {"price": 150.25, "volume": 1000000} # Register tools with agents register_function( analyze_sentiment, caller=agent, executor=agent, description="Analyze sentiment of text", ) register_function( fetch_market_data, caller=agent, executor=agent, description="Fetch market data for a company", ) # Agent can now use both GraphRAG and custom tools [](https://docs.falkordb.com/genai-tools/ag2.html#use-cases) Use Cases ---------------------------------------------------------------------- * **Multi-Agent Research Systems**: Teams of agents collaborating to research complex topics using knowledge graphs * **Customer Support Automation**: Intelligent agents answering queries with contextual knowledge from company databases * **Business Intelligence**: Agents analyzing business data and providing strategic insights * **Content Generation**: Creating factually accurate content grounded in knowledge graphs * **Decision Support Systems**: Multi-agent systems helping humans make informed decisions * **Knowledge Management**: Automated extraction and organization of information from documents * **Trip Planning**: Collaborative agents using graph data for personalized travel recommendations [](https://docs.falkordb.com/genai-tools/ag2.html#key-features) Key Features ---------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/ag2.html#graphrag-advantages) GraphRAG Advantages * **Structured Knowledge**: Query relationships and entities in a graph database * **Reduced Hallucinations**: Ground agent responses in factual graph data * **Explainable AI**: Trace reasoning paths through graph queries * **Real-Time Updates**: Knowledge graphs can be updated dynamically * **Multi-Tenancy**: Isolate knowledge graphs for different projects or users * **High Performance**: FalkorDB’s speed enables real-time agent interactions ### [](https://docs.falkordb.com/genai-tools/ag2.html#ag2-core-capabilities) AG2 Core Capabilities * **Multi-Agent Orchestration**: Coordinate multiple AI agents with different roles * **LLM Agnostic**: Works with OpenAI, Google, Anthropic, Azure, and more * **Tool Integration**: Agents can use external APIs, databases, and functions * **Human-in-the-Loop**: Seamlessly integrate human oversight and feedback * **State Management**: Maintain conversation context and agent state * **Flexible Workflows**: Define custom agent behaviors and interaction patterns [](https://docs.falkordb.com/genai-tools/ag2.html#best-practices) Best Practices -------------------------------------------------------------------------------- 1. **Schema Design**: Structure your knowledge graph with clear entities and relationships 2. **Document Quality**: Provide high-quality, well-structured input documents for better graph extraction 3. **Agent Roles**: Define clear, specific roles for each agent in multi-agent systems 4. **Error Handling**: Implement fallback mechanisms for failed queries or agent responses 5. **Context Management**: Balance context window size with response quality 6. **Query Optimization**: Use specific, targeted queries for better performance 7. **Incremental Updates**: Update knowledge graphs incrementally as new data arrives 8. **Security**: Implement proper authentication and authorization for graph access 9. **Monitoring**: Track agent performance and query patterns for optimization 10. **Testing**: Validate agent behavior with diverse query scenarios [](https://docs.falkordb.com/genai-tools/ag2.html#performance-considerations) Performance Considerations -------------------------------------------------------------------------------------------------------- * **Batch Processing**: Process multiple documents in batches for efficient graph building * **Caching**: Cache frequently accessed graph patterns and results * **Connection Pooling**: Reuse FalkorDB connections across agents * **Parallel Queries**: Execute independent queries in parallel when possible * **Graph Optimization**: Regularly optimize graph structure for query performance [](https://docs.falkordb.com/genai-tools/ag2.html#resources) Resources ---------------------------------------------------------------------- * 🔗 [AG2 Documentation](https://docs.ag2.ai/) * 🔗 [AG2 API Reference](https://docs.ag2.ai/latest/docs/reference/) * 🔗 [AG2 GitHub Repository](https://github.com/ag2ai/ag2) * 📓 [AG2 GitHub Examples](https://github.com/ag2ai/ag2/tree/main/notebook) * 📓 [AG2 GraphRAG with FalkorDB Notebook](https://docs.ag2.ai/latest/docs/use-cases/notebooks/notebooks/agentchat_graph_rag_falkordb/) * 🔗 [FalkorDB GraphRAG-SDK](https://docs.falkordb.com/graphrag-sdk.html) * 📝 [Blog: FalkorDB-AG2.ai Integration for Multi-Agent Systems](https://www.falkordb.com/news-updates/ag2-integration-multi-agent-systems/) * 📝 [Blog: Structured Knowledge with FalkorDB Graph RAG](https://docs.ag2.ai/latest/docs/blog/2024/12/06/FalkorDB-Structured/) * 📝 [Blog: Knowledgeable Agents with FalkorDB Graph RAG](https://dev.to/ag2ai/knowledgeable-agents-with-falkordb-graph-rag-9d) * * * --- # Betweenness Centrality | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/algorithms/betweenness-centrality.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#betweenness-centrality) Betweenness Centrality ================================================================================================================== [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#introduction) Introduction ---------------------------------------------------------------------------------------------- Betweenness Centrality is a graph algorithm that quantifies the importance of a node based on the number of shortest paths that pass through it. Nodes that frequently occur on shortest paths between other nodes have higher betweenness centrality scores. This makes the algorithm useful for identifying **key connectors** or **brokers** within a network. [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#algorithm-overview) Algorithm Overview ---------------------------------------------------------------------------------------------------------- The core idea of Betweenness Centrality is that a node is more important if it lies on many of the shortest paths connecting other nodes. It’s particularly useful in understanding information flow or communication efficiency in a graph. > For example, in a social network, a person who frequently connects otherwise unconnected groups would have high betweenness centrality. [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#syntax) Syntax ---------------------------------------------------------------------------------- The procedure accepts an optional configuration map: CALL algo.betweenness({ nodeLabels: [], relationshipTypes: [], samplingSize: , samplingSeed: }) YIELD node, score ### [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#parameters) Parameters | Name | Type | Description | Default | | --- | --- | --- | --- | | `nodeLabels` | Array | _(Optional)_ List of node labels to include in the computation. | `[]` (all labels) | | `relationshipTypes` | Array | _(Optional)_ List of relationship types to traverse. | `[]` (all relationship types) | | `samplingSize` | Integer | _(Optional)_ Number of randomly sampled **source nodes** used to approximate betweenness centrality. Larger values usually improve accuracy but increase runtime. If `samplingSize` exceeds the number of eligible source nodes (nodes matching `nodeLabels`), all eligible source nodes are used. | `32` | | `samplingSeed` | Integer | _(Optional)_ Random seed used when sampling source nodes. Use a fixed value for reproducible results. If omitted (or set to `0`), a time-based seed is used and results may vary between runs. | `0` (time-based) | ### [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#yield) Yield | Name | Type | Description | | --- | --- | --- | | `node` | Node | The node being evaluated | | `score` | Float | The betweenness centrality score for the node | [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#example) Example ------------------------------------------------------------------------------------ Let’s take this Social Graph as an example: ![Social Graph](https://docs.falkordb.com/images/between.png) ### [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#create-the-graph) Create the Graph CREATE (a:Person {name: 'Alice'}), (b:Person {name: 'Bob'}), (c:Person {name: 'Charlie'}), (d:Person {name: 'David'}), (e:Person {name: 'Emma'}), (a)-[:FRIEND]->(b), (b)-[:FRIEND]->(c), (b)-[:FRIEND]->(d), (c)-[:FRIEND]->(e), (d)-[:FRIEND]->(e) ### [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#run-betweenness-centrality---sort-persons-by-importance-based-on-friend-relationship) Run Betweenness Centrality - Sort Persons by importance based on FRIEND relationship CALL algo.betweenness({ 'nodeLabels': ['Person'], 'relationshipTypes': ['FRIEND'] }) YIELD node, score RETURN node.name AS person, score ORDER BY score DESC Expected result: | person | score | | --- | --- | | `Bob` | 6 | | `Charlie` | 2 | | `David` | 2 | | `Alice` | 0 | | `Emma` | 0 | [](https://docs.falkordb.com/algorithms/betweenness-centrality.html#usage-notes) Usage Notes -------------------------------------------------------------------------------------------- * Scores are based on **all shortest paths** between node pairs. * Nodes that serve as bridges between clusters tend to score higher. * Betweenness Centrality can be computationally expensive on large, dense graphs. * Use `samplingSize` to trade accuracy for performance (larger samples are slower but usually more accurate). * Set `samplingSeed` to a fixed value to make runs reproducible; if you omit it, results may vary between runs due to random sampling. * * * --- # BFS | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/algorithms/bfs.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/algorithms/bfs.html#bfs) BFS ========================================================= [](https://docs.falkordb.com/algorithms/bfs.html#overview) Overview ------------------------------------------------------------------- The Breadth-First Search (BFS) procedure allows you to perform a breadth-first traversal of a graph starting from a specific node. BFS explores all the nodes at the present depth before moving on to nodes at the next depth level. This is particularly useful for finding the shortest path between two nodes or exploring a graph layer by layer. [](https://docs.falkordb.com/algorithms/bfs.html#syntax) Syntax --------------------------------------------------------------- CALL algo.bfs(start_node, max_depth, relationship) YIELD nodes, edges [](https://docs.falkordb.com/algorithms/bfs.html#arguments) Arguments --------------------------------------------------------------------- | Name | Type | Description | Default | | --- | --- | --- | --- | | start\_node | Node | Starting node for the BFS traversal | (Required) | | max\_depth | Integer | Maximum depth to traverse | (Required) | | relationship | String or null | The relationship type to traverse. If null, all relationship types are used | null | [](https://docs.falkordb.com/algorithms/bfs.html#returns) Returns ----------------------------------------------------------------- | Name | Type | Description | | --- | --- | --- | | nodes | List | List of visited nodes in breadth-first order | | edges | List | List of edges traversed during the BFS | [](https://docs.falkordb.com/algorithms/bfs.html#examples) Examples ------------------------------------------------------------------- ### [](https://docs.falkordb.com/algorithms/bfs.html#social-network-friend-recommendations) Social Network Friend Recommendations This example demonstrates how to use BFS to find potential friend recommendations in a social network. By exploring friends of friends, BFS uncovers second-degree connections—people you may know through mutual friends—which are often strong candidates for relevant and meaningful recommendations. #### [](https://docs.falkordb.com/algorithms/bfs.html#create-the-graph) Create the Graph CREATE (alice:Person {name: 'Alice', age: 28, city: 'New York'}), (bob:Person {name: 'Bob', age: 32, city: 'Boston'}), (charlie:Person {name: 'Charlie', age: 35, city: 'Chicago'}), (david:Person {name: 'David', age: 29, city: 'Denver'}), (eve:Person {name: 'Eve', age: 31, city: 'San Francisco'}), (frank:Person {name: 'Frank', age: 27, city: 'Miami'}), (alice)-[:FRIEND]->(bob), (alice)-[:FRIEND]->(charlie), (bob)-[:FRIEND]->(david), (charlie)-[:FRIEND]->(eve), (david)-[:FRIEND]->(frank), (eve)-[:FRIEND]->(frank) ![Graph BFS](https://docs.falkordb.com/images/graph_bfs.png) #### [](https://docs.falkordb.com/algorithms/bfs.html#find-friends-of-friends-potential-recommendations) Find Friends of Friends (Potential Recommendations) // Find Alice's friends-of-friends (potential recommendations) MATCH (alice:Person {name: 'Alice'}) CALL algo.bfs(alice, 2, 'FRIEND') YIELD nodes // Process results to get only depth 2 connections (friends of friends) WHERE size(nodes) >= 3 WITH alice, nodes[2] AS potential_friend WHERE NOT (alice)-[:FRIEND]->(potential_friend) RETURN potential_friend In this social network example, the BFS algorithm helps find potential friend recommendations by identifying people who are connected to Alice’s existing friends but not directly connected to Alice yet. [](https://docs.falkordb.com/algorithms/bfs.html#performance-considerations) Performance Considerations ------------------------------------------------------------------------------------------------------- * **Indexing:** Ensure properties used for finding your starting node are indexed for optimal performance * **Maximum Depth:** Choose an appropriate max\_depth value based on your graph’s connectivity; large depths in highly connected graphs can result in exponential growth of traversed nodes * **Relationship Filtering:** When applicable, specify the relationship type to limit the traversal scope * **Memory Management:** Be aware that the procedure stores visited nodes in memory to avoid cycles, which may require significant resources in large, densely connected graphs [](https://docs.falkordb.com/algorithms/bfs.html#error-handling) Error Handling ------------------------------------------------------------------------------- Common errors that may occur: * **Null Starting Node:** If the start\_node parameter is null, the procedure will raise an error; ensure your MATCH clause successfully finds the starting node * **Invalid Relationship Type:** If you specify a relationship type that doesn’t exist in your graph, the traversal will only include the starting node * **Memory Limitations:** For large graphs with high connectivity, an out-of-memory error may occur if too many nodes are visited * **Result Size:** If the BFS traversal returns too many nodes, query execution may be slow or time out; in such cases, try reducing the max\_depth or filtering by relationship types * * * --- # BOLT protocol support | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/integration/bolt-support.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/integration/bolt-support.html#experimental-bolt-protocol-support-for-falkordb) \[EXPERIMENTAL\] BOLT protocol support for FalkorDB =============================================================================================================================================================== > **Note:** For production use cases, please use our [official client libraries](https://docs.falkordb.com/getting-started/clients.html) > instead. FalkorDB provides an experimental support for querying using BOLT drivers. We intend to extend the support in the future versions, the current version is not meant to be used in production. This guide will walk you through the process of connecting to FalkorDB using the [BOLT protocol](https://en.wikipedia.org/wiki/Bolt_(network_protocol)) [](https://docs.falkordb.com/integration/bolt-support.html#prerequisites) Prerequisites --------------------------------------------------------------------------------------- Before you begin, ensure that you have a FalkorDB instance up and running. You can use our Docker image for this purpose. docker run -p 6379:6379 -p 7687:7687 -p 3000:3000 -it -e REDIS_ARGS="--requirepass falkordb" -e FALKORDB_ARGS="BOLT_PORT 7687" --rm falkordb/falkordb:latest ### [](https://docs.falkordb.com/integration/bolt-support.html#ports) Ports * 6379 - FalkorDB * 7687 - Bolt * 3000 - Falkor-Browser Additionally, install the necessary BOLT drivers: pip install neo4j [](https://docs.falkordb.com/integration/bolt-support.html#step-1-create-a-mainpy-file) Step 1: Create a `main.py` File ----------------------------------------------------------------------------------------------------------------------- Create a main.py file with the following content and adjust the connection uri, authentication parameters and database name according to your FalkorDB setup. This script demonstrates a simple query that returns the numbers from 1 to 10. Customize the query as needed for your specific use case. from neo4j import GraphDatabase driver = GraphDatabase.driver("bolt://localhost:7687", auth=("falkordb", "")) records, summary, keys = driver.execute_query( "UNWIND range(1, $n) AS i RETURN i", n=10, database_="mygraph", ) for record in records: print(record["i"]) [](https://docs.falkordb.com/integration/bolt-support.html#step-2-run-the-script) Step 2: Run the script -------------------------------------------------------------------------------------------------------- Execute the script by running the following command in your terminal: bash python main.py * * * --- # Building Docker | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/operations/building-docker.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/operations/building-docker.html#building-a-docker-container) Building a Docker container ===================================================================================================================== The Dockerfile examples in this directory are generated by the FalkorDB build system. The build uses a [python script](https://github.com/RedisLabsModules/readies/blob/master/bin/dockerwrapper) , to generate a dockerfile, on a per-platform basis, and build a docker container from that. The dockerfile, calls various scripts from the [readies](https://github.com/redislabsmodules/readies) in order to further abstract everything away. [](https://docs.falkordb.com/operations/building-docker.html#requirements) Requirements --------------------------------------------------------------------------------------- In order to generate the dockerfile, or run the build system you need the following installed: 1. python > 3.6 2. [jinja](https://jinja.palletsprojects.com/) (pip install jinja2) 3. docker [](https://docs.falkordb.com/operations/building-docker.html#manual-installation) Manual Installation ----------------------------------------------------------------------------------------------------- As the docker build calls various scripts from within [readies](https://github.com/redislabsmodules/readies) , the following are the series of commands triggered on a per-platform order. Note: these commands are literally what is run, meaning there is duplication. The command list is generated by running **./sbin/system-setup.py -n** in the corresponding docker for each platform. In the case of any script run from the _readies_ repository, the associated script is similarly run with the **\-n** option, producing the list below. If manually installing packages, please ensure all commands are run via sudo, or through similar privilege escalation, ensuring that package installation will succeed. ### [](https://docs.falkordb.com/operations/building-docker.html#centos-7) Centos 7 In addition to the above-mentioned requirements, it is assumed that epel repositories have been enabled. yum install -q -y ca-certificates yum install -q -y curl wget unzip /usr/bin/python3 -m pip install --disable-pip-version-check wheel virtualenv /usr/bin/python3 -m pip install --disable-pip-version-check setuptools --upgrade /build/deps/readies/bin/enable-utf8 yum install -q -y git automake libtool autoconf yum install -q -y redhat-lsb-core yum groupinstall -y 'Development Tools' yum install -q -y centos-release-scl yum install -q -y devtoolset-10 yum install -q -y devtoolset-10-libatomic-devel rm -f /etc/profile.d/scl-devtoolset-*.sh yum install -q -y m4 libgomp cd /tmp; build_dir=$(mktemp -d); cd $build_dir; wget -q -O peg.tar.gz https://github.com/gpakosz/peg/archive/0.1.18.tar.gz; tar xzf peg.tar.gz; cd peg-0.1.18; make; make install MANDIR=.; cd /tmp; rm -rf $build_dir yum install -q -y valgrind yum install -q -y astyle yum install -q -y ca-certificates yum install -q -y curl wget unzip wget -q -O /tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-`uname`-`uname -m`.sh; sh /tmp/cmake.sh --skip-license --prefix=/usr/local; rm -f /tmp/cmake.sh /usr/bin/python3 -m pip install --disable-pip-version-check psutil /build/deps/readies/bin/getgcc yum install -q -y python3-devel /usr/bin/python3 -m pip install --disable-pip-version-check psutil yum install -q -y git /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/redisfab/redis-py.git@3.5 /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed redis-py-cluster /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabsModules/RLTest.git@master /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabs/RAMP@master /usr/bin/python3 -m pip install --disable-pip-version-check -r tests/requirements.txt ### [](https://docs.falkordb.com/operations/building-docker.html#ubuntu-bionic-1804) Ubuntu Bionic (18.04) apt-get -qq update -y apt-get -qq install -y ca-certificates apt-get -qq install -y curl wget unzip /usr/bin/python3 -m pip install --disable-pip-version-check wheel virtualenv /usr/bin/python3 -m pip install --disable-pip-version-check setuptools --upgrade /build/deps/readies/bin/enable-utf8 apt-get -qq install -y git automake libtool autoconf apt-get -qq install -y locales apt-get -qq update -y apt-get -qq install -y build-essential apt-get -qq install -y peg apt-get -qq install -y valgrind apt-get -qq install -y astyle apt-get -qq update -y apt-get -qq install -y ca-certificates apt-get -qq install -y curl wget unzip wget -q -O /tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-`uname`-`uname -m`.sh; sh /tmp/cmake.sh --skip-license --prefix=/usr/local; rm -f /tmp/cmake.sh /usr/bin/python3 -m pip install --disable-pip-version-check psutil apt-get remove -y python3-psutil apt-get -qq update -y apt-get -qq install -y build-essential apt-get -qq install -y python3-dev /usr/bin/python3 -m pip install --disable-pip-version-check psutil apt-get -qq install -y git /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/redisfab/redis-py.git@3.5 /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed redis-py-cluster /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabsModules/RLTest.git@master /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabs/RAMP@master /usr/bin/python3 -m pip install --disable-pip-version-check -r tests/requirements.txt ### [](https://docs.falkordb.com/operations/building-docker.html#debian-buster-10) Debian Buster (10) apt-get -qq update -y apt-get -qq install -y ca-certificates apt-get -qq install -y curl wget unzip /usr/bin/python3 -m pip install --disable-pip-version-check wheel virtualenv /usr/bin/python3 -m pip install --disable-pip-version-check setuptools --upgrade /build/deps/readies/bin/enable-utf8 apt-get -qq install -y git automake libtool autoconf apt-get -qq install -y locales apt-get -qq update -y apt-get -qq install -y build-essential apt-get -qq install -y peg apt-get -qq install -y valgrind apt-get -qq install -y astyle /build/deps/readies/bin/getcmake apt-get -qq update -y /usr/bin/python3 -m pip install --disable-pip-version-check psutil apt-get remove -y python3-psutil apt-get -qq update -y apt-get -qq install -y build-essential apt-get -qq install -y python3-dev /usr/bin/python3 -m pip install --disable-pip-version-check psutil apt-get -qq install -y git /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/redisfab/redis-py.git@3.5 /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed redis-py-cluster /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabsModules/RLTest.git@master /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabs/RAMP@master /usr/bin/python3 -m pip install --disable-pip-version-check -r tests/requirements.txt ### [](https://docs.falkordb.com/operations/building-docker.html#alpine-3) Alpine 3 apk add bash busybox python3 apk add -q ca-certificates apk add -q curl wget unzip /usr/bin/python3 -m pip install --disable-pip-version-check wheel virtualenv /usr/bin/python3 -m pip install --disable-pip-version-check setuptools --upgrade /build/deps/readies/bin/enable-utf8 apk add -q git automake libtool autoconf apk add -q automake make autoconf libtool m4 apk add -q build-base musl-dev gcc g++ cd /tmp; build_dir=$(mktemp -d); cd $build_dir; wget -q -O peg.tar.gz https://github.com/gpakosz/peg/archive/0.1.18.tar.gz; tar xzf peg.tar.gz; cd peg-0.1.18; make; make install MANDIR=.; cd /tmp; rm -rf $build_dir apk add -q valgrind apk add -q astyle apk add -q ca-certificates apk add -q curl wget unzip wget -q -O /tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1-`uname`-`uname -m`.sh; sh /tmp/cmake.sh --skip-license --prefix=/usr/local; rm -f /tmp/cmake.sh apk add -q linux-headers apk add -q git /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/redisfab/redis-py.git@3.5 /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed redis-py-cluster /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabsModules/RLTest.git@master /usr/bin/python3 -m pip install --disable-pip-version-check --no-cache-dir --ignore-installed git+https://github.com/RedisLabs/RAMP@master /usr/bin/python3 -m pip install --disable-pip-version-check -r tests/requirements.txt * * * --- # GRAPH.BULK endpoint specification | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/design/bulk-spec.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/design/bulk-spec.html#graphbulk-endpoint-specification) GRAPH.BULK endpoint specification ====================================================================================================================== The FalkorDB bulk loader uses the GRAPH.BULK endpoint to build a new graph from 1 or more Redis queries. The bulk of these queries is binary data that is unpacked to create nodes, edges, and their properties. This endpoint could be used to write bespoke import tools for other data formats using the implementation details provided here. [](https://docs.falkordb.com/design/bulk-spec.html#caveats) Caveats ------------------------------------------------------------------- The main complicating factor in writing bulk importers is that Redis has a maximum string length of 512 megabytes and a default maximum query size of 1 gigabyte. As such, large imports must be written incrementally. The FalkorDB team will do their best to ensure that future updates to this logic do not break current implementations, but cannot guarantee it. [](https://docs.falkordb.com/design/bulk-spec.html#query-format) Query Format ----------------------------------------------------------------------------- GRAPH.BULK [graph name] ["BEGIN"] [node count] [edge count] ([binary blob] * N) ### [](https://docs.falkordb.com/design/bulk-spec.html#arguments) Arguments #### [](https://docs.falkordb.com/design/bulk-spec.html#graph-name) graph name The name of the graph to be inserted. #### [](https://docs.falkordb.com/design/bulk-spec.html#begin) BEGIN The endpoint cannot be used to update existing graphs, only to create new ones. For this reason, the first query in a sequence of BULK commands should pass the string literal “BEGIN”. #### [](https://docs.falkordb.com/design/bulk-spec.html#node-count) node count Number of nodes being inserted in this query. #### [](https://docs.falkordb.com/design/bulk-spec.html#edge-count) edge count Number of edges being inserted in this query. #### [](https://docs.falkordb.com/design/bulk-spec.html#binary-blob) binary blob A binary string of up to 512 megabytes that partially or completely describes a single label or relationship type. Any number of these blobs may be provided in a query provided that Redis’s 1-gigabyte query limit is not exceeded. ### [](https://docs.falkordb.com/design/bulk-spec.html#module-behavior) Module behavior The endpoint will parse binary blobs as nodes until the number of created nodes matches the node count, then will parse subsequent blobs as edges. The import tool is expected to correctly provide these counts. If the `BEGIN` token is found, the module will verify that the graph key is unused, and will emit an error if it is. Otherwise, the partially-constructed graph will be retrieved in order to resume building. [](https://docs.falkordb.com/design/bulk-spec.html#binary-blob-format) Binary Blob format ----------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/design/bulk-spec.html#node-format) Node format Nodes in node blobs do not need to specify their IDs. The ID of each node is an 8-byte unsigned integer corresponding to the node count at the time of its creation. (The first-created node has the ID of 0, the second has 1, and so forth.) The blob consists of: 1. [header specification](https://docs.falkordb.com/design/bulk-spec.html#header-specification) 2. 1 or more [property specifications](https://docs.falkordb.com/design/bulk-spec.html#property-specification) ### [](https://docs.falkordb.com/design/bulk-spec.html#edge-format) Edge format The import tool is responsible for tracking the IDs of nodes used as edge endpoints. The blob consists of: 1. [header specification](https://docs.falkordb.com/design/bulk-spec.html#header-specification) 2. 1 or more: 1. 8-byte unsigned integer representing source node ID 2. 8-byte unsigned integer representing destination node ID 3. [property specification](https://docs.falkordb.com/design/bulk-spec.html#property-specification) #### [](https://docs.falkordb.com/design/bulk-spec.html#header-specification) Header specification 1. `name` - A null-terminated string representing the name of the label or relationship type. 2. `property count` - A 4-byte unsigned integer representing the number of properties each entry in this blob possesses. 3. `property names` - an ordered sequence of `property count` null-terminated strings, each representing the name for the property at that position. #### [](https://docs.falkordb.com/design/bulk-spec.html#property-specification) Property specification 1. `property type` - A 1-byte integer corresponding to the [TYPE enum](https://github.com/FalkorDB/FalkorDB/blob/master/src/bulk_insert/bulk_insert.c#L14-L23) : BI_NULL = 0, BI_BOOL = 1, BI_DOUBLE = 2, BI_STRING = 3, BI_LONG = 4, BI_ARRAY = 5, 2. `property`: * 1-byte true/false if type is boolean * 8-byte double if type is double * 8-byte integer if type is integer * Null-terminated C string if type is string * 8-byte array length followed by N values of this same type-property pair if type is array [](https://docs.falkordb.com/design/bulk-spec.html#redis-reply) Redis Reply --------------------------------------------------------------------------- Redis will reply with a string of the format: [N] nodes created, [M] edges created * * * --- # CALL | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/call.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/call.html#call-) CALL {} ============================================================ The CALL {} (subquery) clause allows local execution of subqueries, which opens the door for many comfortable and efficient actions on a graph. The subquery is executed once for each record in the input stream. The subquery may be a returning or non-returning subquery. A returning subquery may change the amount of records, while a non-returning subquery will not. The variables in the scope before the CALL {} clause are available after the clause, together with the variables returned by the subquery (in the case of a returning subquery). Variables may be imported from the outer scope **only** in an opening `WITH` clause, via simple projections (e.g. `WITH n, m`), or via `WITH *` (which imports all bound variables). The variables returned from a subquery may not override existing variables in the outer scope. The CALL {} clause may be used for numerous purposes, such as: Post-`UNION` processing, local environment for aggregations and actions on every input row, efficient operations using a limited namespace (via imports) and performing side-effects using non-returning subqueries. Let’s see some examples. * Post-`UNION` processing. We can easily get the cheapest and most expensive items in a store and set their `of_interest` property to `true` (to keep monitoring the ‘interesting’ items) using post-`UNION` processing: GRAPH.QUERY DEMO_GRAPH CALL { MATCH (s:Store {name: 'Walmart'})-[:SELLS]->(i:Item) RETURN i AS item ORDER BY price ASC LIMIT 1 UNION MATCH (s:Store {name: 'Walmart'})-[:SELLS]->(i:Item) RETURN i AS item ORDER BY price DESC LIMIT 1 } SET item.of_interest = true RETURN item.name AS name, item.price AS price We can utilize post-`UNION` processing to perform aggregations over differently-matched entities. For example, we can count the number of customers and vendors that a store interacts with: GRAPH.QUERY DEMO_GRAPH CALL { MATCH (s:Store {name: 'Walmart'})-[:SELLS_TO]->(c:Customer) RETURN c AS interface UNION MATCH (s:Store {name: 'Walmart'})-[:BUYS_FROM]->(v:Vendor) RETURN v AS interface } RETURN count(interface) AS interfaces * Local environment for aggregations and actions on every input row. Another key feature of the CALL {} clause is the ability to perform isolated aggregations on every input row. For example, let’s check if there is any correlation between the amount of sales per-product and the advertisement-intensity implemented for it in a particular month. GRAPH.QUERY DEMO_GRAPH MATCH (item:Item) CALL { WITH item MATCH (item)-[s:SOLD_TO {advertisement_intensity: 10}]->(c:Customer) WHERE s.date > '01-01-2023' AND s.date < '01-02-2023' RETURN count(s) AS item_sales_ads_high } CALL { WITH item MATCH (item)-[s:SOLD_TO {advertisement_intensity: 5}]->(c:Customer) WHERE s.date > '01-01-2023' AND s.date < '01-02-2023' RETURN count(s) AS item_sales_ads_low } RETURN item.name AS name, item_sales_ads_high as high_ads_sales, item_sales_ads_low as low_ads_sales * Side-effects. We can comfortably perform side-effects using non-returning subqueries. For example, we can mark a sub-group of nodes in the graph holding some shared property. Let’s mark all the items in a Walmart store that were sold more than 100 times as popular items, and return **all** items in the store: GRAPH.QUERY DEMO_GRAPH MATCH (item:Item) CALL { WITH item MATCH (item)-[s:SOLD_TO]->(c:Customer) WITH item, count(s) AS item_sales WHERE item_sales > 100 SET item.popular = true } RETURN item * * * --- # text.camelCase | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/text/camelCase.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#textcamelcase) text.camelCase ======================================================================================== [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#description) Description ----------------------------------------------------------------------------------- Converts a string to camelCase format by removing non-alphanumeric characters and capitalizing the first letter of each word except the first. [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#syntax) Syntax ------------------------------------------------------------------------- flex.text.camelCase(string) [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#parameters) Parameters --------------------------------------------------------------------------------- | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `string` | string | Yes | The string to convert to camelCase | [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#returns) Returns --------------------------------------------------------------------------- **Type:** string The input string converted to camelCase format. Returns `null` if input is `null`. [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#examples) Examples ----------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#example-1-basic-usage) Example 1: Basic Usage RETURN flex.text.camelCase('hello world') AS result **Output:** result ---------- helloWorld ### [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#example-2-converting-field-names) Example 2: Converting Field Names RETURN flex.text.camelCase('user_first_name') AS result **Output:** result ------------- userFirstName ### [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#example-3-normalizing-property-names) Example 3: Normalizing Property Names WITH ['first-name', 'last_name', 'Email Address'] AS fields UNWIND fields AS field RETURN field AS original, flex.text.camelCase(field) AS camelCase [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#notes) Notes ----------------------------------------------------------------------- * Returns `null` for `null` input * Removes all non-alphanumeric characters * First character is always lowercase * Subsequent words start with uppercase * Useful for normalizing field names to JavaScript/JSON conventions [](https://docs.falkordb.com/udfs/flex/text/camelCase.html#see-also) See Also ----------------------------------------------------------------------------- * [text.upperCamelCase](https://docs.falkordb.com/udfs/flex/text/upperCamelCase.html) - Convert to UpperCamelCase (PascalCase) * [text.snakeCase](https://docs.falkordb.com/udfs/flex/text/snakeCase.html) - Convert to snake\_case format * [text.capitalize](https://docs.falkordb.com/udfs/flex/text/capitalize.html) - Capitalize first character only * * * --- # text.capitalize | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/text/capitalize.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#textcapitalize) text.capitalize =========================================================================================== [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#description) Description ------------------------------------------------------------------------------------ Capitalizes the first character of a string, converting it to uppercase while leaving the rest of the string unchanged. [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#syntax) Syntax -------------------------------------------------------------------------- flex.text.capitalize(string) [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#parameters) Parameters ---------------------------------------------------------------------------------- | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `string` | string | Yes | The string to capitalize | [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#returns) Returns ---------------------------------------------------------------------------- **Type:** string The input string with its first character converted to uppercase. Returns `null` if the input is `null`, and empty string if input is empty. [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#examples) Examples ------------------------------------------------------------------------------ ### [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#example-1-basic-usage) Example 1: Basic Usage RETURN flex.text.capitalize('hello world') AS result **Output:** result ------------- Hello world ### [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#example-2-capitalizing-node-properties) Example 2: Capitalizing Node Properties MATCH (p:Person) RETURN p.id, flex.text.capitalize(p.name) AS capitalizedName [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#notes) Notes ------------------------------------------------------------------------ * Returns `null` for `null` input * Returns empty string for empty string input * Only affects the first character * Does not change the case of subsequent characters [](https://docs.falkordb.com/udfs/flex/text/capitalize.html#see-also) See Also ------------------------------------------------------------------------------ * [text.decapitalize](https://docs.falkordb.com/udfs/flex/text/decapitalize.html) - Lowercase the first character * [text.camelCase](https://docs.falkordb.com/udfs/flex/text/camelCase.html) - Convert to camelCase format * [text.upperCamelCase](https://docs.falkordb.com/udfs/flex/text/upperCamelCase.html) - Convert to UpperCamelCase format * * * --- # Chat Panel | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/ui/chat-panel.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/ui/chat-panel.html#chat-panel) Chat Panel ============================================================================== The Chat panel lets you use English (natural language) to query the graph. [](https://docs.falkordb.com/browser/ui/chat-panel.html#prerequisites) Prerequisites ------------------------------------------------------------------------------------ Chat requires configuring: * An LLM provider API key * A model These are set in **Settings → Browser Settings → Chat**. [](https://docs.falkordb.com/browser/ui/chat-panel.html#opening-the-panel) Opening the panel -------------------------------------------------------------------------------------------- On the Graphs page (`/graph`), click **CHAT** in the left sidebar. When Chat is opened, element selection is cleared (the side panel is dedicated to chat interactions). [](https://docs.falkordb.com/browser/ui/chat-panel.html#message-retention) Message retention -------------------------------------------------------------------------------------------- The number of saved interactions is configurable in settings (the UI enforces a bounded range). * * * --- # Community Detection using Label Propagation (CDLP) | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/algorithms/cdlp.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/algorithms/cdlp.html#community-detection-using-label-propagation-cdlp) Community Detection using Label Propagation (CDLP) ====================================================================================================================================================== [](https://docs.falkordb.com/algorithms/cdlp.html#overview) Overview -------------------------------------------------------------------- The Community Detection using Label Propagation (CDLP) algorithm identifies communities in networks by propagating labels through the graph structure. Each node starts with a unique label, and through iterative propagation, nodes adopt the most frequent label among their neighbors, naturally forming communities where densely connected nodes share the same label. CDLP serves as a powerful algorithm in scenarios such as: * Social network community detection * Biological network module identification * Web page clustering and topic detection * Market segmentation analysis * Fraud detection networks [](https://docs.falkordb.com/algorithms/cdlp.html#algorithm-details) Algorithm Details -------------------------------------------------------------------------------------- CDLP initializes by assigning each node a unique label (typically its node ID). The algorithm then iteratively updates each node’s label to the most frequent label among its neighbors. During each iteration, nodes are processed in random order to avoid deterministic bias. The algorithm continues until labels stabilize (no changes occur) or a maximum number of iterations is reached. The final labels represent community assignments, where nodes sharing the same label belong to the same community. The algorithm’s strength lies in its ability to discover communities without requiring prior knowledge of the number of communities or their sizes. It runs in near-linear time and mimics epidemic contagion by spreading labels through the network. ### [](https://docs.falkordb.com/algorithms/cdlp.html#performance) Performance CDLP operates with a time complexity of **O(m + n)** per iteration, where: * **n** represents the total number of nodes * **m** represents the total number of edges The algorithm typically converges within a few iterations, making it highly efficient for large-scale networks. [](https://docs.falkordb.com/algorithms/cdlp.html#syntax) Syntax ---------------------------------------------------------------- CALL algo.labelPropagation([config]) ### [](https://docs.falkordb.com/algorithms/cdlp.html#parameters) Parameters The procedure accepts an optional configuration `Map` with the following parameters: | Name | Type | Default | Description | | --- | --- | --- | --- | | `nodeLabels` | Array | All labels | Array of node labels to filter which nodes are included in the computation | | `relationshipTypes` | Array | All relationship types | Array of relationship types to define which edges are traversed | | `maxIterations` | Integer | 10 | Maximum number of iterations to run the algorithm | ### [](https://docs.falkordb.com/algorithms/cdlp.html#return-values) Return Values The procedure returns a stream of records with the following fields: | Name | Type | Description | | --- | --- | --- | | `node` | Node | The node entity included in the community | | `communityId` | Integer | Identifier of the community the node belongs to | [](https://docs.falkordb.com/algorithms/cdlp.html#examples) Examples -------------------------------------------------------------------- Let’s take this Social Network as an example: (Alice)---(Bob)---(Charlie) (Kate) | | | (Diana) | (Eve)---(Frank) | | | | (Grace)--(Henry) (Iris)--(Jack) There are 3 different communities that should emerge from this network: * Alice, Bob, Charlie, Diana, Grace, Henry * Eve, Frank, Iris, Jack * Any isolated nodes ### [](https://docs.falkordb.com/algorithms/cdlp.html#create-the-graph) Create the Graph CREATE (alice:Person {name: 'Alice'}), (bob:Person {name: 'Bob'}), (charlie:Person {name: 'Charlie'}), (diana:Person {name: 'Diana'}), (eve:Person {name: 'Eve'}), (frank:Person {name: 'Frank'}), (grace:Person {name: 'Grace'}), (henry:Person {name: 'Henry'}), (iris:Person {name: 'Iris'}), (jack:Person {name: 'Jack'}), (kate:Person {name: 'Kate'}), (alice)-[:KNOWS]->(bob), (bob)-[:KNOWS]->(charlie), (alice)-[:KNOWS]->(diana), (bob)-[:KNOWS]->(henry), (diana)-[:KNOWS]->(grace), (grace)-[:KNOWS]->(henry), (charlie)-[:KNOWS]->(eve), (eve)-[:KNOWS]->(frank), (eve)-[:KNOWS]->(iris), (frank)-[:KNOWS]->(jack), (iris)-[:KNOWS]->(jack) ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-detect-all-communities-in-the-network) Example: Detect all communities in the network CALL algo.labelPropagation() YIELD node, communityId RETURN node.name AS name, communityId ORDER BY communityId, name #### [](https://docs.falkordb.com/algorithms/cdlp.html#expected-results) Expected Results | name | communityId | |————|————-| | `Alice` | 0 | | `Bob` | 0 | | `Charlie` | 0 | | `Diana` | 0 | | `Grace` | 0 | | `Henry` | 0 | | `Eve` | 2 | | `Frank` | 2 | | `Iris` | 2 | | `Jack` | 2 | | `Kate` | 10 | ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-detect-communities-with-limited-iterations) Example: Detect communities with limited iterations CALL algo.labelPropagation({maxIterations: 5}) YIELD node, communityId ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-focus-on-specific-node-types) Example: Focus on specific node types CALL algo.labelPropagation({nodeLabels: ['Person']}) YIELD node, communityId ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-use-only-certain-relationship-types) Example: Use only certain relationship types CALL algo.labelPropagation({relationshipTypes: ['KNOWS', 'FRIENDS_WITH']}) YIELD node, communityId ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-combine-node-and-relationship-filtering) Example: Combine node and relationship filtering CALL algo.labelPropagation({ nodeLabels: ['Person'], relationshipTypes: ['KNOWS'] }) YIELD node, communityId ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-group-communities-together) Example: Group communities together CALL algo.labelPropagation() YIELD node, communityId RETURN collect(node.name) AS community_members, communityId, count(*) AS community_size ORDER BY community_size DESC #### [](https://docs.falkordb.com/algorithms/cdlp.html#expected-results-1) Expected Results | community\_members | communityId | community\_size | |———————————————————-|————-|—————-| | `["Alice", "Bob", "Charlie", "Diana", "Grace", "Henry"]` | 0 | 6 | | `["Eve", "Frank", "Iris", "Jack"]` | 2 | 4 | | `["Kate"]` | 10 | 1 | ### [](https://docs.falkordb.com/algorithms/cdlp.html#example-find-the-largest-communities) Example: Find the largest communities CALL algo.labelPropagation() YIELD node, communityId RETURN communityId, collect(node) AS nodes, count(*) AS size ORDER BY size DESC LIMIT 1 * * * --- # CREATE | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/create.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/create.html#create) CREATE ============================================================== The `CREATE` clause is used to introduce new nodes and relationships into the graph. [](https://docs.falkordb.com/cypher/create.html#creating-nodes) Creating Nodes ------------------------------------------------------------------------------ The simplest example creates a single node without any labels or properties: CREATE (n) You can create multiple entities by separating them with commas: CREATE (n),(m) Create a node with a label and properties: CREATE (:Person {name: 'Kurt', age: 27}) [](https://docs.falkordb.com/cypher/create.html#creating-relationships) Creating Relationships ---------------------------------------------------------------------------------------------- To add relationships between nodes, you typically match existing nodes first, then create the relationship. In this example, we find an existing source node and create a new relationship with a new destination node: GRAPH.QUERY DEMO_GRAPH "MATCH (a:Person) WHERE a.name = 'Kurt' CREATE (a)-[:MEMBER]->(:Band {name:'Nirvana'})" Here the source node `(a:Person)` is matched (bound), while the destination node `(:Band)` is unbound and will be created. This query creates a new node representing the band Nirvana and a new `MEMBER` relationship connecting Kurt to the band. [](https://docs.falkordb.com/cypher/create.html#creating-complete-patterns) Creating Complete Patterns ------------------------------------------------------------------------------------------------------ You can create entire graph patterns in a single statement. All entities within the pattern that are not bound (matched) will be created: GRAPH.QUERY DEMO_GRAPH "CREATE (jim:Person{name:'Jim', age:29})-[:FRIENDS]->(pam:Person {name:'Pam', age:27})-[:WORKS]->(:Employer {name:'Dunder Mifflin'})" This query creates three nodes (Jim, Pam, and an Employer) and two relationships (FRIENDS and WORKS), establishing a complete graph pattern in one operation. * * * --- # Cluster | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/operations/cluster.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/operations/cluster.html#setting-up-a-falkordb-cluster) Setting Up a FalkorDB Cluster ================================================================================================================= Setting up a FalkorDB cluster enables you to distribute your data across multiple nodes, providing horizontal scalability and improved fault tolerance. This guide will walk you through the steps to configure a FalkorDB cluster with 3 masters and 1 replica for each, using Docker. [](https://docs.falkordb.com/operations/cluster.html#prerequisites) Prerequisites --------------------------------------------------------------------------------- Before you begin, ensure you have the following: * Docker installed on your machine. * A working FalkorDB Docker image. You can pull it from Docker Hub. * Basic knowledge of Docker networking and commands. [](https://docs.falkordb.com/operations/cluster.html#step-1-network-configuration) Step 1: Network Configuration ---------------------------------------------------------------------------------------------------------------- First, create a Docker network to allow communication between the FalkorDB nodes. docker network create falkordb-cluster-network This network will enable the containers to communicate with each other. [](https://docs.falkordb.com/operations/cluster.html#step-2-launching-falkordb-nodes) Step 2: Launching FalkorDB Nodes ---------------------------------------------------------------------------------------------------------------------- Next, you need to launch multiple FalkorDB instances that will form the cluster. For example, you can start six nodes: ### [](https://docs.falkordb.com/operations/cluster.html#21-start-the-nodes) 2.1 Start the nodes for i in {1..6}; do docker run -d \ --name node$i \ --hostname node$i \ --network falkordb-cluster-network \ -p $((6379 + i - 1)):$((6379 + i - 1)) \ -e BROWSER=0 \ -e "FALKORDB_ARGS=--port $((6379 + i - 1)) --cluster-enabled yes --cluster-announce-ip node$i --cluster-announce-port $((6379 + i - 1))" \ falkordb/falkordb done ### [](https://docs.falkordb.com/operations/cluster.html#22-edit-the-etchosts-file-and-add-the-node-container-hostnames) 2.2 Edit the /etc/hosts file and add the node container hostnames For the host to be able to connect to the nodes using the container names, please update your `/etc/hosts` file using the following command. for i in {1..6};do sudo echo "127.0.0.1 node$i" | sudo tee -a /etc/hosts done [](https://docs.falkordb.com/operations/cluster.html#step-3-configuring-the-cluster) Step 3: Configuring the Cluster -------------------------------------------------------------------------------------------------------------------- Once all nodes are up, you need to connect them to form a cluster. Use the `redis-cli` tool inside one of the nodes to initiate the cluster setup. ### [](https://docs.falkordb.com/operations/cluster.html#31-initiate-the-cluster) 3.1 Initiate the Cluster This command will join node1-node6 into a cluster. docker exec -it node1 redis-cli --cluster create node1:6379 node2:6380 node3:6381 node4:6382 node5:6383 node6:6384 --cluster-replicas 1 --cluster-yes ### [](https://docs.falkordb.com/operations/cluster.html#32-verify-cluster-status) 3.2 Verify Cluster Status You can verify the status of the cluster with: docker exec -it node1 redis-cli --cluster check node1:6379 This command will display the status of each node and their roles (master/replica). ### [](https://docs.falkordb.com/operations/cluster.html#33-create-a-graph-to-test-deployment) 3.3 Create a Graph to test deployment The following query will create a graph named “network” within your cluster. redis-cli -c GRAPH.QUERY network "UNWIND range(1, 100) AS id CREATE (n:Person {id: id, name: 'Person ' + toString(id), age: 20 + id % 50})" [](https://docs.falkordb.com/operations/cluster.html#step-4-scaling-the-cluster) Step 4: Scaling the Cluster ------------------------------------------------------------------------------------------------------------ You can scale the cluster by adding more nodes as needed. Simply launch additional FalkorDB instances and add them to the cluster using the falkordb-cli tool. For example, to add a new node: ### [](https://docs.falkordb.com/operations/cluster.html#41-start-a-new-node) 4.1 Start a New Node docker run -d \ --name node7 \ --hostname node7 \ --network falkordb-cluster-network \ -p 6385:6385 \ -e BROWSER=0 \ -e "FALKORDB_ARGS=--port 6385 --cluster-enabled yes --cluster-announce-ip node7 --cluster-announce-port 6385" \ falkordb/falkordb ### [](https://docs.falkordb.com/operations/cluster.html#42-add-the-node-to-the-cluster) 4.2 Add the Node to the Cluster docker exec -it node1 redis-cli --cluster add-node node7:6385 node1:6379 This will add node7 into the existing cluster. ### [](https://docs.falkordb.com/operations/cluster.html#43-add-the-new-node-to-the-etchosts-file) 4.3 Add the new node to the /etc/hosts file sudo echo "127.0.0.1 node7" | sudo tee -a /etc/hosts [](https://docs.falkordb.com/operations/cluster.html#conclusion) Conclusion --------------------------------------------------------------------------- With your FalkorDB cluster set up, you now have a scalable, distributed environment that can handle increased loads and provide higher availability. * * * --- # Configuration | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#configuration) Configuration ================================================================================================== [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#environment-variables) Environment Variables ------------------------------------------------------------------------------------------------------------------ # FalkorDB Configuration FALKORDB_HOST=localhost FALKORDB_PORT=6379 FALKORDB_USERNAME= # Optional FALKORDB_PASSWORD= # Optional FALKORDB_DEFAULT_READONLY=false # Set to 'true' for read-only mode # Transport Mode MCP_TRANSPORT=stdio # 'stdio' (default) or 'http' MCP_PORT=3000 # Port for HTTP transport MCP_API_KEY= # Optional API key for HTTP transport # Logging (optional) ENABLE_FILE_LOGGING=false [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#transport-modes) Transport Modes ------------------------------------------------------------------------------------------------------ ### [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#stdio-default) stdio (default) Used for direct integration with AI clients like Claude Desktop. Communication happens via standard input/output. MCP_TRANSPORT=stdio ### [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#http) HTTP Exposes the MCP server over HTTP for remote or networked access: MCP_TRANSPORT=http MCP_PORT=3000 MCP_API_KEY=your-secret-api-key # Optional but recommended When using HTTP transport, clients connect via the MCP Streamable HTTP protocol. API key authentication is enforced via the `Authorization: Bearer ` header when `MCP_API_KEY` is set. [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#read-only-mode-for-replica-instances) Read-Only Mode for Replica Instances ------------------------------------------------------------------------------------------------------------------------------------------------ Enable read-only mode by default to prevent writes to replica instances: FALKORDB_DEFAULT_READONLY=true **Use cases:** * **Replica instances**: Prevent writes to read replicas in replication setups * **Production safety**: Ensure critical data isn’t accidentally modified * **Reporting/analytics**: Run queries for dashboards without risk of data changes * **Multi-tenant environments**: Provide read-only access to certain users [](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html#running-multiple-instances) Running Multiple Instances ---------------------------------------------------------------------------------------------------------------------------- You can configure multiple MCP servers for different FalkorDB instances: { "mcpServers": { "falkordb-dev": { "command": "npx", "args": ["-y", "@falkordb/mcpserver@latest"], "env": { "FALKORDB_HOST": "dev.falkordb.local", "FALKORDB_DEFAULT_READONLY": "false" } }, "falkordb-prod-replica": { "command": "npx", "args": ["-y", "@falkordb/mcpserver@latest"], "env": { "FALKORDB_HOST": "replica.falkordb.com", "FALKORDB_DEFAULT_READONLY": "true" } } } } * * * --- # Data / Property Panel | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/ui/data-panel.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/ui/data-panel.html#data--property-panel) Data / Property Panel =================================================================================================== The Data panel opens when you select a node or edge in the graph. It’s used to inspect properties and perform edit operations. [](https://docs.falkordb.com/browser/ui/data-panel.html#what-it-shows) What it shows ------------------------------------------------------------------------------------ For the selected element: * **ID** * **Attributes count** * **Labels** (nodes) or **Relationship type** (edges) * A **properties table** (key/value) for viewing and editing attributes [](https://docs.falkordb.com/browser/ui/data-panel.html#node-label-management) Node label management ---------------------------------------------------------------------------------------------------- For nodes (and when the user role is not Read-Only): * **Add Label** * **Remove Label** (except the “default” empty label) Label changes are immediately reflected in: * The in-app graph model * The visible canvas node styling * The graph info panel counts/listing [](https://docs.falkordb.com/browser/ui/data-panel.html#editing-properties) Editing properties ---------------------------------------------------------------------------------------------- Properties are managed via the embedded table component. Typical operations include: * Editing existing values * Adding/removing properties (Exact editing options depend on the table component implementation.) [](https://docs.falkordb.com/browser/ui/data-panel.html#keyboard-shortcut) Keyboard shortcut -------------------------------------------------------------------------------------------- * `Esc` closes the Data panel. * * * --- # Docker Deployment | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/mcpserver/docker.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/mcpserver/docker.html#docker-deployment) Docker Deployment =================================================================================================== [](https://docs.falkordb.com/genai-tools/mcpserver/docker.html#using-docker-hub-images) Using Docker Hub Images --------------------------------------------------------------------------------------------------------------- # Use the latest stable release docker pull falkordb/mcpserver:latest docker run -p 3000:3000 \ -e FALKORDB_HOST=host.docker.internal \ -e FALKORDB_PORT=6379 \ -e MCP_API_KEY=your-secret-key \ falkordb/mcpserver:latest # Or use the edge version (latest main branch) docker pull falkordb/mcpserver:edge # Or pin to a specific version docker pull falkordb/mcpserver:1.0.0 * * * --- # DELETE | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/delete.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/delete.html#delete) DELETE ============================================================== The `DELETE` clause is used to remove nodes and relationships from the graph. [](https://docs.falkordb.com/cypher/delete.html#important-behavior) Important Behavior -------------------------------------------------------------------------------------- **⚠️ Note:** Deleting a node automatically deletes all of its incoming and outgoing relationships. You cannot have orphaned relationships in the graph. [](https://docs.falkordb.com/cypher/delete.html#deleting-nodes) Deleting Nodes ------------------------------------------------------------------------------ To delete a node and all of its relationships: GRAPH.QUERY DEMO_GRAPH "MATCH (p:Person {name:'Jim'}) DELETE p" [](https://docs.falkordb.com/cypher/delete.html#deleting-relationships) Deleting Relationships ---------------------------------------------------------------------------------------------- To delete specific relationships: GRAPH.QUERY DEMO_GRAPH "MATCH (:Person {name:'Jim'})-[r:FRIENDS]->() DELETE r" This query deletes all outgoing `FRIENDS` relationships from the node with name ‘Jim’, while keeping the nodes intact. [](https://docs.falkordb.com/cypher/delete.html#common-patterns) Common Patterns -------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/cypher/delete.html#delete-all-nodes-and-relationships-in-a-graph) Delete all nodes and relationships in a graph GRAPH.QUERY DEMO_GRAPH "MATCH (n) DETACH DELETE n" The `DETACH DELETE` automatically removes all relationships before deleting the node. ### [](https://docs.falkordb.com/cypher/delete.html#conditional-deletion) Conditional deletion GRAPH.QUERY DEMO_GRAPH "MATCH (p:Person) WHERE p.age < 18 DELETE p" Deletes all Person nodes where age is less than 18. * * * --- # Configuration | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/getting-started/configuration.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/getting-started/configuration.html#configuration) Configuration ============================================================================================ FalkorDB supports [Redis configuration](https://redis.io/docs/management/config/) and multiple module configuration parameters. Some of these parameters can only be set at load-time, while other parameters can be set either on load-time or on run-time. For example, the following command will run the server with global authentication password and 4 threads: docker run -p 6379:6379 -p 3000:3000 -it -e REDIS_ARGS="--requirepass falkordb" -e FALKORDB_ARGS="THREAD_COUNT 4" --rm falkordb/falkordb:latest > **Production Tip:** For production environments, use the lighter `falkordb/falkordb-server` image which doesn’t include the FalkorDB Browser: > > docker run -p 6379:6379 -it -e REDIS_ARGS="--requirepass falkordb" -e FALKORDB_ARGS="THREAD_COUNT 4" --rm falkordb/falkordb-server:latest > [](https://docs.falkordb.com/getting-started/configuration.html#setting-configuration-parameters-on-module-load) Setting Configuration Parameters on Module Load ---------------------------------------------------------------------------------------------------------------------------------------------------------------- Configuration parameters can be set at load-time by appending arguments after the `--loadmodule` argument when starting a server from the command line or after the `loadmodule` directive in a Redis config file. ### [](https://docs.falkordb.com/getting-started/configuration.html#examples) Examples In [redis.conf](https://redis.io/docs/manual/config/) : loadmodule ./falkordb.so [OPT VAL]... From the [Redis CLI](https://redis.io/docs/manual/cli/) , using the [MODULE LOAD](https://redis.io/commands/module-load/) command: 127.0.0.6379> MODULE LOAD falkordb.so [OPT VAL]... From the command line: $ redis-server --loadmodule ./falkordb.so [OPT VAL]... When running a docker container docker run -p 6379:6379 -p 3000:3000 -it -e FALKORDB_ARGS="[OPT VAL]" --rm falkordb/falkordb:latest Or for production use: docker run -p 6379:6379 -it -e FALKORDB_ARGS="[OPT VAL]" --rm falkordb/falkordb-server:latest [](https://docs.falkordb.com/getting-started/configuration.html#setting-configuration-parameters-at-run-time-for-supported-parameters) Setting Configuration Parameters at Run-Time (for Supported Parameters) -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FalkorDB exposes the `GRAPH.CONFIG` command for setting and retrieving configuration parameters at run-time. To set the value of a configuration parameter at run-time (for supported parameters), simply run: GRAPH.CONFIG SET OPT1 VAL1 Similarly, current configuration parameter values can be retrieved using: GRAPH.CONFIG GET OPT1 GRAPH.CONFIG GET * Values set using `GRAPH.CONFIG SET` are not persisted after server restart. [](https://docs.falkordb.com/getting-started/configuration.html#falkordb-configuration-parameters) FalkorDB configuration parameters ------------------------------------------------------------------------------------------------------------------------------------ The following table summarizes which configuration parameters can be set at module load-time and which can also be set at run-time: | Configuration Parameter | Load-time | Run-time | | --- | --- | --- | | [THREAD\_COUNT](https://docs.falkordb.com/getting-started/configuration.html#thread_count) | V | X | | [CACHE\_SIZE](https://docs.falkordb.com/getting-started/configuration.html#cache_size) | V | X | | [OMP\_THREAD\_COUNT](https://docs.falkordb.com/getting-started/configuration.html#omp_thread_count) | V | X | | [NODE\_CREATION\_BUFFER](https://docs.falkordb.com/getting-started/configuration.html#node_creation_buffer) | V | X | | [BOLT\_PORT](https://docs.falkordb.com/getting-started/configuration.html#bolt_port) | V | X | | [MAX\_QUEUED\_QUERIES](https://docs.falkordb.com/getting-started/configuration.html#max_queued_queries) | V | V | | [TIMEOUT](https://docs.falkordb.com/getting-started/configuration.html#timeout) | V | V | | [TIMEOUT\_MAX](https://docs.falkordb.com/getting-started/configuration.html#timeout_max) | V | V | | [TIMEOUT\_DEFAULT](https://docs.falkordb.com/getting-started/configuration.html#timeout_default) | V | V | | [RESULTSET\_SIZE](https://docs.falkordb.com/getting-started/configuration.html#resultset_size) | V | V | | [QUERY\_MEM\_CAPACITY](https://docs.falkordb.com/getting-started/configuration.html#query_mem_capacity) | V | V | | [VKEY\_MAX\_ENTITY\_COUNT](https://docs.falkordb.com/getting-started/configuration.html#vkey_max_entity_count) | V | V | | [EFFECTS\_THRESHOLD](https://docs.falkordb.com/getting-started/configuration.html#effects_threshold) | V | V | | [CMD\_INFO](https://docs.falkordb.com/getting-started/configuration.html#cmd_info) | V | V | | [MAX\_INFO\_QUERIES](https://docs.falkordb.com/getting-started/configuration.html#max_info_queries) | V | V | | [DELTA\_MAX\_PENDING\_CHANGES](https://docs.falkordb.com/getting-started/configuration.html#delta_max_pending_changes) | V | V | | [IMPORT\_FOLDER](https://docs.falkordb.com/getting-started/configuration.html#import_folder) | V | X | * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#thread_count) THREAD\_COUNT The number of threads in FalkorDB’s thread pool. This is equivalent to the maximum number of queries that can be processed concurrently. #### [](https://docs.falkordb.com/getting-started/configuration.html#default) Default `THREAD_COUNT` defaults to the system’s hardware threads (logical cores). #### [](https://docs.falkordb.com/getting-started/configuration.html#example) Example $ redis-server --loadmodule ./falkordb.so THREAD_COUNT 4 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#cache_size) CACHE\_SIZE The max number of queries for FalkorDB to cache. When a new query is encountered and the cache is full, meaning the cache has reached the size of `CACHE_SIZE`, it will evict the least recently used (LRU) entry. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-1) Default `CACHE_SIZE` default value is 25. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-1) Example $ redis-server --loadmodule ./falkordb.so CACHE_SIZE 10 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#omp_thread_count) OMP\_THREAD\_COUNT The maximum number of threads that OpenMP may use for computation per query. These threads are used for parallelizing GraphBLAS computations, so may be considered to control concurrency within the execution of individual queries. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-2) Default `OMP_THREAD_COUNT` is defined by GraphBLAS. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-2) Example $ redis-server --loadmodule ./falkordb.so OMP_THREAD_COUNT 1 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#node_creation_buffer) NODE\_CREATION\_BUFFER The node creation buffer is the number of new nodes that can be created without resizing matrices. For example, when set to 16,384, the matrices will have extra space for 16,384 nodes upon creation. Whenever the extra space is depleted, the matrices’ size will increase by 16,384. Reducing this value will reduce memory consumption, but cause performance degradation due to the increased frequency of matrix resizes. Conversely, increasing it might improve performance for write-heavy workloads but will increase memory consumption. If the passed argument was not a power of 2, it will be rounded to the next-greatest power of 2 to improve memory alignment. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-3) Default `NODE_CREATION_BUFFER` is 16,384. #### [](https://docs.falkordb.com/getting-started/configuration.html#minimum) Minimum The minimum value for `NODE_CREATION_BUFFER` is 128. Values lower than this will be accepted as arguments, but will internally be converted to 128. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-3) Example $ redis-server --loadmodule ./falkordb.so NODE_CREATION_BUFFER 200 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#bolt_port) BOLT\_PORT The Bolt port configuration determines the port number on which FalkorDB handles the [bolt protocol](https://en.wikipedia.org/wiki/Bolt_(network_protocol)) #### [](https://docs.falkordb.com/getting-started/configuration.html#default-4) Default `BOLT_PORT` -1 (disabled). #### [](https://docs.falkordb.com/getting-started/configuration.html#example-4) Example $ redis-server --loadmodule ./falkordb.so BOLT_PORT 7687 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#max_queued_queries) MAX\_QUEUED\_QUERIES Setting the maximum number of queued queries allows the server to reject incoming queries with the error message `Max pending queries exceeded`. This reduces the memory overhead of pending queries on an overloaded server and avoids congestion when the server processes its backlog of queries. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-5) Default `MAX_QUEUED_QUERIES` is effectively unlimited (config value of `UINT64_MAX`). #### [](https://docs.falkordb.com/getting-started/configuration.html#example-5) Example $ redis-server --loadmodule ./falkordb.so MAX_QUEUED_QUERIES 500 $ redis-cli GRAPH.CONFIG SET MAX_QUEUED_QUERIES 500 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#timeout) TIMEOUT (Deprecated in FalkorDB v2.10 It is recommended to use `TIMEOUT_MAX` and `TIMEOUT_DEFAULT` instead) The `TIMEOUT` configuration parameter specifies the default maximal execution time for read queries, in milliseconds. Write queries do not timeout. When a read query execution time exceeds the maximal execution time, the query is aborted and the query reply is `(error) Query timed out`. The `TIMEOUT` query parameter of the `GRAPH.QUERY`, `GRAPH.RO_QUERY`, and `GRAPH.PROFILE` commands can be used to override this value. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-6) Default * Before v2.10: `TIMEOUT` is off (set to `0`). * Since v2.10: `TIMEOUT` is not specified; `TIMEOUT_MAX` and `TIMEOUT_DEFAULT` are specified instead. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-6) Example $ redis-server --loadmodule ./falkordb.so TIMEOUT 1000 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#timeout_max) TIMEOUT\_MAX (Since v2.10) The `TIMEOUT_MAX` configuration parameter specifies the maximum execution time for both read and write queries, in milliseconds. The `TIMEOUT` query parameter value of the `GRAPH.QUERY`, `GRAPH.RO_QUERY`, and `GRAPH.PROFILE` commands cannot exceed the `TIMEOUT_MAX` value (the command would abort with a `(error) The query TIMEOUT parameter value cannot exceed the TIMEOUT_MAX configuration parameter value` reply). Similarly, the `TIMEOUT_DEFAULT` configuration parameter cannot exceed the `TIMEOUT_MAX` value. When a query execution time exceeds the maximal execution time, the query is aborted and the query reply is `(error) Query timed out`. For a write query - any change to the graph is undone (which may take additional time). #### [](https://docs.falkordb.com/getting-started/configuration.html#default-7) Default * Before v2.10: unspecified and unsupported. * Since v2.10: `TIMEOUT_MAX` is off (set to `0`). #### [](https://docs.falkordb.com/getting-started/configuration.html#example-7) Example $ redis-server --loadmodule ./falkordb.so TIMEOUT_MAX 1000 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#timeout_default) TIMEOUT\_DEFAULT (Since v2.10) The `TIMEOUT_DEFAULT` configuration parameter specifies the default maximal execution time for both read and write queries, in milliseconds. For a given query, this default maximal execution time can be overridden by the `TIMEOUT` query parameter of the `GRAPH.QUERY`, `GRAPH.RO_QUERY`, and `GRAPH.PROFILE` commands. However, a query execution time cannot exceed `TIMEOUT_MAX`. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-8) Default * Before v2.10: unspecified and unsupported. * Since v2.10: `TIMEOUT_DEFAULT` is equal to `TIMEOUT_MAX` (set to `0`). #### [](https://docs.falkordb.com/getting-started/configuration.html#example-8) Example $ redis-server --loadmodule ./falkordb.so TIMEOUT_MAX 2000 TIMEOUT_DEFAULT 1000 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#resultset_size) RESULTSET\_SIZE Result set size is a limit on the number of records that should be returned by any query. This can be a valuable safeguard against incurring a heavy IO load while running queries with unknown results. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-9) Default `RESULTSET_SIZE` is unlimited (negative config value). #### [](https://docs.falkordb.com/getting-started/configuration.html#example-9) Example 127.0.0.1:6379> GRAPH.CONFIG SET RESULTSET_SIZE 3 OK 127.0.0.1:6379> GRAPH.QUERY G "UNWIND range(1, 5) AS x RETURN x" 1) 1) "x" 2) 1) 1) (integer) 1 2) 1) (integer) 2 3) 1) (integer) 3 3) 1) "Cached execution: 0" 2) "Query internal execution time: 0.445790 milliseconds" * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#query_mem_capacity) QUERY\_MEM\_CAPACITY Setting the memory capacity of a query allows the server to kill queries that are consuming too much memory and return with the error message `Query's mem consumption exceeded capacity`. This helps to avoid scenarios when the server becomes unresponsive due to an unbounded query exhausting system resources. The configuration argument is the maximum number of bytes that can be allocated by any single query. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-10) Default `QUERY_MEM_CAPACITY` is unlimited; this default can be restored by setting `QUERY_MEM_CAPACITY` to zero or a negative value. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-10) Example $ redis-server --loadmodule ./falkordb.so QUERY_MEM_CAPACITY 1048576 # 1 megabyte limit $ redis-cli GRAPH.CONFIG SET QUERY_MEM_CAPACITY 1048576 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#vkey_max_entity_count) VKEY\_MAX\_ENTITY\_COUNT To lower the time Redis is blocked when replicating large graphs, FalkorDB serializes the graph in a number of virtual keys. One virtual key is created for every N graph entities, where N is the value defined by this configuration. This configuration can be set when the module loads or at runtime. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-11) Default `VKEY_MAX_ENTITY_COUNT` is 100,000. ### [](https://docs.falkordb.com/getting-started/configuration.html#cmd_info) CMD\_INFO An on/off toggle for the `GRAPH.INFO` command. Disabling this command may increase performance and lower the memory usage and these are the main reasons for it to be disabled. It’s valid values are ‘yes’ and ‘no’ (i.e., on and off). #### [](https://docs.falkordb.com/getting-started/configuration.html#default-12) Default `CMD_INFO` is `yes`. ### [](https://docs.falkordb.com/getting-started/configuration.html#max_info_queries) MAX\_INFO\_QUERIES A limit for the number of previously executed queries stored in the telemetry stream. A number within the range \[0, 1000\] #### [](https://docs.falkordb.com/getting-started/configuration.html#default-13) Default `MAX_INFO_QUERIES` is 1000. * * * [](https://docs.falkordb.com/getting-started/configuration.html#query-configurations) Query Configurations ---------------------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/getting-started/configuration.html#query-timeout) Query Timeout * Before v2.10, or if `TIMEOUT_DEFAULT` and `TIMEOUT_MAX` are not specified: `TIMEOUT` allows overriding the `TIMEOUT` configuration parameter for a single read query. Write queries do not timeout. * Since v2.10, if either `TIMEOUT_DEFAULT` or `TIMEOUT_MAX` are specified: `TIMEOUT` allows overriding the `TIMEOUT_DEFAULT` configuration parameter value for a single `GRAPH.QUERY`, `GRAPH.RO_QUERY`, or `GRAPH.PROFILE` command. The `TIMEOUT` value cannot exceed the `TIMEOUT_MAX` value (the command would abort with a `(error) The query TIMEOUT parameter value cannot exceed the TIMEOUT_MAX configuration parameter value` reply). #### [](https://docs.falkordb.com/getting-started/configuration.html#example-11) Example Retrieve all paths in a graph with a timeout of 500 milliseconds. GRAPH.QUERY wikipedia "MATCH p=()-[*]->() RETURN p" TIMEOUT 500 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#effects_threshold) EFFECTS\_THRESHOLD Replicate modification via effect when average modification time > `EFFECTS_THRESHOLD` #### [](https://docs.falkordb.com/getting-started/configuration.html#default-14) Default `EFFECTS_THRESHOLD` is 300 μs. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-12) Example Assume `MATCH (n) WHERE n.id < 100 SET n.v = n.v + 1` updated 5 nodes and the query total execution time is 5ms, the average modification time is: total execution time / number of changes: 5ms / 5 = 1ms. if the average modification time is greater then `EFFECTS_THRESHOLD` the query will be replicated to both replicas and AOF as a graph effect otherwise the original query will be replicated. * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#delta_max_pending_changes) DELTA\_MAX\_PENDING\_CHANGES The `DELTA_MAX_PENDING_CHANGES` configuration parameter controls the maximum number of uncommitted (pending) changes that can be accumulated in FalkorDB’s internal delta structure before they must be processed. The delta is a data structure used by FalkorDB to buffer graph modifications (such as node or edge creation, updates, or deletions) before they’re finalized. This parameter helps manage memory usage and transaction behavior by limiting how many changes can accumulate. Increasing this value allows larger transactions and bulk operations to proceed with fewer interruptions, which may improve throughput for write-heavy workloads. Conversely, decreasing it provides stricter memory control and helps prevent memory spikes during large transactions. #### [](https://docs.falkordb.com/getting-started/configuration.html#default-15) Default `DELTA_MAX_PENDING_CHANGES` defaults to 10,000. #### [](https://docs.falkordb.com/getting-started/configuration.html#minimum-1) Minimum The value must be non-negative (0 or greater). Setting it to 0 resets it to the default value. #### [](https://docs.falkordb.com/getting-started/configuration.html#example-13) Example $ redis-server --loadmodule ./falkordb.so DELTA_MAX_PENDING_CHANGES 20000 $ redis-cli GRAPH.CONFIG SET DELTA_MAX_PENDING_CHANGES 20000 * * * ### [](https://docs.falkordb.com/getting-started/configuration.html#import_folder) IMPORT\_FOLDER The import folder configuration specifies an absolute path to a folder from which FalkorDB is allowed to load CSV files. Defaults to: `/var/lib/FalkorDB/import/` * * * * * * --- # text.decapitalize | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#textdecapitalize) text.decapitalize ================================================================================================= [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#description) Description -------------------------------------------------------------------------------------- Converts the first character of a string to lowercase while leaving the rest of the string unchanged. [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#syntax) Syntax ---------------------------------------------------------------------------- flex.text.decapitalize(string) [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#parameters) Parameters ------------------------------------------------------------------------------------ | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `string` | string | Yes | The string to decapitalize | [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#returns) Returns ------------------------------------------------------------------------------ **Type:** string The input string with its first character converted to lowercase. Returns `null` if the input is `null`, and empty string if input is empty. [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#examples) Examples -------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#example-1-basic-usage) Example 1: Basic Usage RETURN flex.text.decapitalize('Hello World') AS result **Output:** result ------------- hello World ### [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#example-2-processing-field-names) Example 2: Processing Field Names WITH ['FirstName', 'LastName', 'Email'] AS fields UNWIND fields AS field RETURN flex.text.decapitalize(field) AS jsonKey [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#notes) Notes -------------------------------------------------------------------------- * Returns `null` for `null` input * Returns empty string for empty string input * Only affects the first character * Does not change the case of subsequent characters [](https://docs.falkordb.com/udfs/flex/text/decapitalize.html#see-also) See Also -------------------------------------------------------------------------------- * [text.capitalize](https://docs.falkordb.com/udfs/flex/text/capitalize.html) - Uppercase the first character * [text.camelCase](https://docs.falkordb.com/udfs/flex/text/camelCase.html) - Convert to camelCase format * * * --- # Data types | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/datatypes.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/datatypes.html#data-types) Data types ================================================================== [](https://docs.falkordb.com/datatypes.html#graph-types) Graph types -------------------------------------------------------------------- All graph types are either structural elements of the graph or projections thereof. None can be stored as a property value. [](https://docs.falkordb.com/datatypes.html#nodes) Nodes -------------------------------------------------------- Nodes are persistent graph elements that can be connected to each other via relationships. They can have any number of labels that describe their general type. For example, a node representing London may be created with the `Place` and `City` labels and retrieved by queries using either or both of them. Nodes have sets of properties to describe all of their salient characteristics. For example, our London node may have the property set: `{name: 'London', capital: True, elevation: 11}`. When querying nodes, multiple labels can be specified. Only nodes that hold all specified labels will be matched: $ redis-cli GRAPH.QUERY G "MATCH (n:Place:Continent) RETURN n" [](https://docs.falkordb.com/datatypes.html#relationships) Relationships ------------------------------------------------------------------------ Relationships are persistent graph elements that connect one node to another. They must have exactly one type that describes what they represent. For example, a `RESIDENT_OF` relationship may be used to connect a `Person` node to a `City` node. Relationships are always directed, connecting a source node to its destination. Like nodes, relationships have sets of properties to describe all of their salient characteristics. When querying relationships, multiple types can be specified by separating them with a pipe (`|`). Relationships that hold any of the specified types will be matched: $ redis-cli GRAPH.QUERY G "MATCH (:Person)-[r:RESIDENT_OF|VISITOR_TO]->(:Place {name: 'London'}) RETURN r" [](https://docs.falkordb.com/datatypes.html#paths) Paths -------------------------------------------------------- Paths are alternating sequences of nodes and edges, starting and ending with a node. They are not structural elements in the graph, but can be created and returned by queries. For example, the following query returns all paths of any length connecting the node London to the node New York: $ redis-cli GRAPH.QUERY G "MATCH p=(:City {name: 'London'})-[*]->(:City {name: 'New York'}) RETURN p" [](https://docs.falkordb.com/datatypes.html#scalar-types) Scalar Types ---------------------------------------------------------------------- All scalar types may be provided by queries or stored as property values on node and relationship objects. ### [](https://docs.falkordb.com/datatypes.html#strings) Strings FalkorDB strings are Unicode character sequences. When using Redis with a TTY (such as invoking FalkorDB commands from the terminal via `redis-cli`), some code points may not be decoded, as in: $ redis-cli GRAPH.QUERY G "RETURN '日本人' as stringval" 1) 1) "stringval" 2) 1) 1) "\xe6\x97\xa5\xe6\x9c\xac\xe4\xba\xba" Output decoding can be forced using the `--raw` flag: $ redis-cli --raw GRAPH.QUERY G "RETURN '日本人' as stringval" stringval 日本人 ### [](https://docs.falkordb.com/datatypes.html#booleans) Booleans Boolean values are specified as `true` or `false`. Internally, they are stored as numerics, with 1 representing true and 0 representing false. As FalkorDB considers types in its comparisons, 1 is not considered equal to `true`: $ redis-cli GRAPH.QUERY G "RETURN 1 = true" 1) 1) "1 = true" 2) 1) 1) "false" ### [](https://docs.falkordb.com/datatypes.html#integers) Integers All FalkorDB integers are treated as 64-bit signed integers. ### [](https://docs.falkordb.com/datatypes.html#floating-point-values) Floating-point values All FalkorDB floating-point values are treated as 64-bit signed doubles. ### [](https://docs.falkordb.com/datatypes.html#geospatial-points) Geospatial Points The Point data type is a set of latitude/longitude coordinates, stored within FalkorDB as a pair of 32-bit floats. It is instantiated using the [point() function call](https://docs.falkordb.com/commands/graph.query#point-functions) . ### [](https://docs.falkordb.com/datatypes.html#nulls) Nulls In FalkorDB, `null` is used to stand in for an unknown or missing value. Since we cannot reason broadly about unknown values, `null` is an important part of FalkorDB’s 3-valued truth table. For example, the comparison `null = null` will evaluate to `null`, as we lack adequate information about the compared values. Similarly, `null in [1,2,3]` evaluates to `null`, since the value we’re looking up is unknown. Unlike all other scalars, `null` cannot be stored as a property value. [](https://docs.falkordb.com/datatypes.html#temporal-types) Temporal Types -------------------------------------------------------------------------- FalkorDB supports the following temporal types that allow modeling and querying time-related data: 1. [Date](https://docs.falkordb.com/datatypes.html#date) - Calendar dates (YYYY-MM-DD) 2. [Time](https://docs.falkordb.com/datatypes.html#time) - Time of day (HH:MM:SS) 3. [DateTime](https://docs.falkordb.com/datatypes.html#datetime) - Combined date and time 4. [Duration](https://docs.falkordb.com/datatypes.html#duration) - Time intervals These types follow the ISO 8601 standard and can be used in properties, parameters, and expressions. ### [](https://docs.falkordb.com/datatypes.html#date) Date Represents a calendar date in the format YYYY-MM-DD. **Purpose:** Use `Date` to store and compare dates without time information, such as birth dates, due dates, or deadlines. **Example:** CREATE (:Event { name: "Conference", date: date("2025-09-15") }) **Interactions:** * Compare using operators (`=`, `<`, `>`, etc.) * Extract components using functions: RETURN date("2025-09-15").year // 2025 RETURN date("2025-09-15").month // 9 RETURN date("2025-09-15").day // 15 ### [](https://docs.falkordb.com/datatypes.html#time) Time Represents a time of day in the format HH:MM:SS. **Purpose:** Use `Time` to store specific times (e.g., store hours, alarm times) without date context. **Example:** CREATE (:Reminder { msg: "Wake up!", at: localtime("07:00:00") }) **Interactions:** * Compare time values: RETURN localtime("07:00:00") < localtime("09:30:00") // true * Extract parts: RETURN localtime("15:45:20").hour // 15 RETURN localtime("15:45:20").minute // 45 RETURN localtime("15:45:20").second // 20 ### [](https://docs.falkordb.com/datatypes.html#datetime) DateTime Represents a point in time, combining both date and time. Format: YYYY-MM-DDTHH:MM:SS. **Purpose:** Use `DateTime` when both date and time are relevant, such as logging events, scheduling, or timestamps. **Example:** CREATE (:Log { message: "System rebooted", at: localdatetime("2025-06-29T13:45:00") }) **Interactions:** * Compare with other `DateTime` values * Extract parts: RETURN localdatetime("2025-06-29T13:45:00").year // 2025 RETURN localdatetime("2025-06-29T13:45:00").hour // 13 * Use `localdatetime()` with no arguments to get the current system time: RETURN localdatetime() ### [](https://docs.falkordb.com/datatypes.html#duration) Duration Represents a span of time in ISO 8601 Duration format: `P[n]Y[n]M[n]DT[n]H[n]M[n]S` **Purpose:** Use `Duration` to represent time intervals, such as “3 days”, “2 hours”, or “1 year and 6 months”. **Example:** CREATE (:Cooldown { period: duration("P3DT12H") }) **Interactions:** * Add/subtract durations with dates or datetimes: RETURN date("2025-01-01") + duration("P1M") // 2025-02-01 RETURN localdatetime("2025-06-29T13:00:00") - duration("PT30M") // 2025-06-29T12:30:00 * Add durations together: RETURN duration("P1D") + duration("PT12H") // P1DT12H * Extract fields: RETURN duration("P1Y2M3DT4H5M6S").years // 1 RETURN duration("P1Y2M3DT4H5M6S").hours // 4 [](https://docs.falkordb.com/datatypes.html#collection-types) Collection Types ------------------------------------------------------------------------------ ### [](https://docs.falkordb.com/datatypes.html#arrays) Arrays Arrays are ordered lists of elements. They can be provided as literals or generated by functions like `collect()`. Nested arrays are supported, as are many functions that operate on arrays such as [list comprehensions](https://docs.falkordb.com/commands/graph.query#list-comprehensions) . Arrays can be stored as property values provided that no array element is of an unserializable type, such as graph entities or `null` values. ### [](https://docs.falkordb.com/datatypes.html#maps) Maps Maps are order-agnostic collections of key-value pairs. If a key is a string literal, the map can be accessed using dot notation. If it is instead an expression that evaluates to a string literal, bracket notation can be used: $ redis-cli GRAPH.QUERY G "WITH {key1: 'stringval', key2: 10} AS map RETURN map.key1, map['key' + 2]" 1) 1) "map.key1"    2) "map['key' + 2]" 2) 1) 1) "stringval"       2) (integer) 10 This aligns with the way that the properties of nodes and relationships can be accessed. Maps cannot be stored as property values. #### [](https://docs.falkordb.com/datatypes.html#map-projections) Map projections Maps can be constructed as projections using the syntax `alias {.key1 [, ...n]}`. This can provide a useful format for returning graph entities. For example, given a graph with the node `(name: 'Jeff', age: 32)`, we can build the projection: $ redis-cli GRAPH.QUERY G "MATCH (n) RETURN n {.name, .age} AS projection" 1) 1) "projection" 2) 1) 1) "{name: Jeff, age: 32}" #### [](https://docs.falkordb.com/datatypes.html#map-merging) Map merging You can combine two maps, where values in the second map will override corresponding values in the first map. For example: $ redis-cli GRAPH.QUERY g "RETURN {a: 1, b: 2} + {a: 2, c: 3}" 1) 1) "{a: 1, b: 2} + {a: 2, c: 3}" 2) 1) 1) "{b: 2, a: 2, c: 3}" 3) 1) "Cached execution: 0" 2) "Query internal execution time: 0.467666 milliseconds" #### [](https://docs.falkordb.com/datatypes.html#function-calls-in-map-values) Function calls in map values The values in maps and map projections are flexible, and can generally refer either to constants or computed values: $ redis-cli GRAPH.QUERY G "RETURN {key1: 'constant', key2: rand(), key3: toLower('GENERATED') + '_string'} AS map" 1) 1) "map" 2) 1) 1) "{key1: constant, key2: 0.889656, key3: generated_string}" The exception to this is aggregation functions, which must be computed in a preceding `WITH` clause instead of being invoked within the map. This restriction is intentional, as it helps to clearly disambiguate the aggregate function calls and the key values they are grouped by: $ redis-cli GRAPH.QUERY G " MATCH (follower:User)-[:FOLLOWS]->(u:User) WITH u, COUNT(follower) AS count RETURN u {.name, follower_count: count} AS user" 1) 1) "user" 2) 1) 1) "{name: Jeff, follower_count: 12}" 2) 1) "{name: Roi, follower_count: 18}" * * * --- # Cognee | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/agentic-memory/cognee.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/agentic-memory/cognee.html#cognee) Cognee ====================================================================== [Cognee](https://github.com/topoteretes/cognee) is a memory management framework for AI agents that provides a flexible approach to storing and retrieving knowledge. It combines graph database capabilities with vector storage to create rich, context-aware memory systems. [](https://docs.falkordb.com/agentic-memory/cognee.html#overview) Overview -------------------------------------------------------------------------- Cognee provides a comprehensive memory layer that: * **Manages complex knowledge structures**: Store entities, relationships, and contextual information * **Supports hybrid storage**: Combine graph databases with vector stores for optimal retrieval * **Enables flexible querying**: Search by semantic similarity, graph relationships, or both * **Scales with your needs**: From simple chatbots to complex multi-agent systems [](https://docs.falkordb.com/agentic-memory/cognee.html#why-cognee--falkordb) Why Cognee + FalkorDB? ---------------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/agentic-memory/cognee.html#falkordbs-added-value) FalkorDB’s Added Value * **Native Graph Storage**: Efficient storage and traversal of entity relationships * **Fast Queries**: Quick retrieval of connected information for context building * **Flexible Schema**: Adapt to evolving knowledge structures without rigid schemas * **Production Ready**: Scale from development to production seamlessly * **Hybrid Capabilities**: Combine graph traversal with vector similarity search ### [](https://docs.falkordb.com/agentic-memory/cognee.html#use-cases) Use Cases * **Conversational AI**: Build chatbots that remember and learn from past conversations * **Knowledge Management**: Create organizational memory that captures relationships and context * **Recommendation Systems**: Leverage connection patterns for personalized recommendations * **Research Assistants**: Help AI agents navigate and understand complex information networks * **Customer Support**: Provide context-aware responses based on customer history and relationships [](https://docs.falkordb.com/agentic-memory/cognee.html#getting-started) Getting Started ---------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/agentic-memory/cognee.html#prerequisites) Prerequisites * Python 3.10 or higher * FalkorDB instance (Cloud or self-hosted) * API keys for LLM and embedding providers (if using those features) ### [](https://docs.falkordb.com/agentic-memory/cognee.html#installation) Installation Install Cognee with the FalkorDB community adapter: pip install cognee pip install cognee-community-hybrid-adapter-falkor ### [](https://docs.falkordb.com/agentic-memory/cognee.html#quick-start-example) Quick Start Example Here’s a complete example to get you started with Cognee and FalkorDB: import asyncio import os import pathlib from os import path from cognee import config, prune, add, cognify, search, SearchType # Import the register module to enable FalkorDB support import cognee_community_hybrid_adapter_falkor.register async def main(): # Set up local directories system_path = pathlib.Path(__file__).parent config.system_root_directory(path.join(system_path, ".cognee_system")) config.data_root_directory(path.join(system_path, ".cognee_data")) # Configure relational database config.set_relational_db_config({ "db_provider": "sqlite", }) # Configure FalkorDB as both vector and graph database config.set_vector_db_config({ "vector_db_provider": "falkordb", "vector_db_url": os.getenv("GRAPH_DB_URL", "localhost"), "vector_db_port": int(os.getenv("GRAPH_DB_PORT", "6379")), }) config.set_graph_db_config({ "graph_database_provider": "falkordb", "graph_database_url": os.getenv("GRAPH_DB_URL", "localhost"), "graph_database_port": int(os.getenv("GRAPH_DB_PORT", "6379")), }) # Optional: Clean previous data await prune.prune_data() await prune.prune_system() # Add and process your content text_data = """ Sarah is a software engineer at TechCorp. She specializes in machine learning and has been working on implementing graph-based recommendation systems. Sarah recently collaborated with Mike on a new project using FalkorDB. Mike is the lead data scientist at TechCorp. """ await add(text_data) await cognify() # Search using graph completion search_results = await search( query_type=SearchType.GRAPH_COMPLETION, query_text="What does Sarah work on?" ) print("Search Results:") for result in search_results: print("\n" + result) # Run the example asyncio.run(main()) ### [](https://docs.falkordb.com/agentic-memory/cognee.html#understanding-the-code) Understanding the Code 1. **Import the FalkorDB Adapter**: Import `cognee_community_hybrid_adapter_falkor.register` to enable FalkorDB support 2. **Configure Directories**: Set up local directories for Cognee’s system and data storage 3. **Configure Databases**: Set FalkorDB as both the vector and graph database for hybrid capabilities 4. **Add Data**: Provide text or structured data to be processed 5. **Cognify**: Process the data to extract entities and relationships 6. **Search**: Query the knowledge using different search types (graph completion, similarity, etc.) [](https://docs.falkordb.com/agentic-memory/cognee.html#advanced-features) Advanced Features -------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/agentic-memory/cognee.html#search-types) Search Types Cognee supports different search types for various use cases: from cognee import search, SearchType # Graph completion search - uses graph structure for context graph_results = await search( query_type=SearchType.GRAPH_COMPLETION, query_text="machine learning projects" ) # Similarity search - semantic vector search similarity_results = await search( query_type=SearchType.SIMILARITY, query_text="machine learning projects" ) # Insights search - combines multiple approaches insights_results = await search( query_type=SearchType.INSIGHTS, query_text="machine learning projects" ) ### [](https://docs.falkordb.com/agentic-memory/cognee.html#llm-configuration) LLM Configuration Configure the LLM provider for entity extraction and processing: import os from cognee import config # Set LLM API key os.environ["LLM_API_KEY"] = "your-openai-api-key" # Configure LLM provider config.set_llm_config({ "llm_provider": "openai", "llm_model": "gpt-4", "llm_temperature": 0.7 }) ### [](https://docs.falkordb.com/agentic-memory/cognee.html#managing-knowledge) Managing Knowledge from cognee import add, cognify, prune # Add multiple documents documents = [\ "Natural language processing is a subfield of AI.",\ "Machine learning models require training data.",\ "Graph databases excel at relationship queries."\ ] for doc in documents: await add(doc) await cognify() # Reset memory (clear all data) await prune.prune_data() await prune.prune_system() ### [](https://docs.falkordb.com/agentic-memory/cognee.html#environment-variables) Environment Variables You can use environment variables for configuration: export GRAPH_DB_URL="localhost" export GRAPH_DB_PORT="6379" export LLM_API_KEY="your-openai-api-key" Then access them in your code: import os from cognee import config config.set_graph_db_config({ "graph_database_provider": "falkordb", "graph_database_url": os.getenv("GRAPH_DB_URL", "localhost"), "graph_database_port": int(os.getenv("GRAPH_DB_PORT", "6379")), }) [](https://docs.falkordb.com/agentic-memory/cognee.html#configuration-options) Configuration Options ---------------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/agentic-memory/cognee.html#database-configuration) Database Configuration from cognee import config # Relational database (for metadata) config.set_relational_db_config({ "db_provider": "sqlite", # or "postgres" }) # FalkorDB as graph database config.set_graph_db_config({ "graph_database_provider": "falkordb", "graph_database_url": "localhost", "graph_database_port": 6379, }) # FalkorDB as vector database (hybrid mode) config.set_vector_db_config({ "vector_db_provider": "falkordb", "vector_db_url": "localhost", "vector_db_port": 6379, }) ### [](https://docs.falkordb.com/agentic-memory/cognee.html#llm-configuration-1) LLM Configuration import os from cognee import config # Set API key via environment variable os.environ["LLM_API_KEY"] = "your-openai-api-key" # Configure LLM config.set_llm_config({ "llm_provider": "openai", "llm_model": "gpt-4", "llm_temperature": 0.7 }) [](https://docs.falkordb.com/agentic-memory/cognee.html#best-practices) Best Practices -------------------------------------------------------------------------------------- 1. **Import Registration First**: Always import `cognee_community_hybrid_adapter_falkor.register` before configuring Cognee 2. **Use Environment Variables**: Store connection details and API keys in environment variables 3. **Batch Processing**: Add multiple documents before calling `cognify()` for better performance 4. **Clean Up**: Use `prune.prune_data()` and `prune.prune_system()` to reset when needed 5. **Hybrid Mode**: Configure FalkorDB as both vector and graph database for optimal search capabilities 6. **Monitor Resources**: Track FalkorDB memory usage and query performance as your knowledge base grows [](https://docs.falkordb.com/agentic-memory/cognee.html#integration-patterns) Integration Patterns -------------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/agentic-memory/cognee.html#with-langchain) With LangChain from cognee import add, cognify, search, SearchType # Use Cognee as a knowledge base for LangChain async def get_context(query): results = await search( query_type=SearchType.GRAPH_COMPLETION, query_text=query ) return results # Integrate with your LangChain application context = await get_context("previous conversations about AI") ### [](https://docs.falkordb.com/agentic-memory/cognee.html#adding-multiple-documents) Adding Multiple Documents from cognee import add, cognify # Add documents to Cognee documents = [\ "Your first document content...",\ "Your second document content...",\ "Your third document content..."\ ] for doc in documents: await add(doc) await cognify() [](https://docs.falkordb.com/agentic-memory/cognee.html#troubleshooting) Troubleshooting ---------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/agentic-memory/cognee.html#installation-issues) Installation Issues If you have trouble installing the community adapter: * Ensure you have the correct package name: `cognee-community-hybrid-adapter-falkor` * Check that you’re using Python 3.10 or higher * Try installing in a fresh virtual environment ### [](https://docs.falkordb.com/agentic-memory/cognee.html#connection-issues) Connection Issues If you experience connection problems: * Verify FalkorDB is running: `redis-cli -h localhost -p 6379 ping` * Check the `GRAPH_DB_URL` and `GRAPH_DB_PORT` environment variables * Ensure FalkorDB is accessible on the specified host and port ### [](https://docs.falkordb.com/agentic-memory/cognee.html#data-not-appearing-in-graph) Data Not Appearing in Graph * Make sure to import `cognee_community_hybrid_adapter_falkor.register` before using Cognee * Call `await cognify()` after adding data to process and extract entities * Check that your LLM API key is set correctly * Verify the graph is being populated using FalkorDB CLI or Browser ### [](https://docs.falkordb.com/agentic-memory/cognee.html#performance-issues) Performance Issues * Consider batching operations for large datasets * Monitor graph size with `GRAPH.MEMORY USAGE` command * Clean up old data periodically using `prune.prune_data()` [](https://docs.falkordb.com/agentic-memory/cognee.html#resources) Resources ---------------------------------------------------------------------------- * 📚 [Cognee Documentation](https://github.com/topoteretes/cognee-community) * 💻 [Cognee GitHub Repository](https://github.com/topoteretes/cognee) * 🔗 [FalkorDB Integration Guide](https://github.com/topoteretes/cognee-community/blob/main/packages/hybrid/falkordb/README.md) * 📖 [Cognee Examples](https://github.com/topoteretes/cognee/tree/main/examples) [](https://docs.falkordb.com/agentic-memory/cognee.html#next-steps) Next Steps ------------------------------------------------------------------------------ * Explore [Graphiti](https://docs.falkordb.com/agentic-memory/graphiti.html) for temporal knowledge graph capabilities * Learn about [GenAI Tools](https://docs.falkordb.com/genai-tools) for graph reasoning and LLM integrations * Review [Cypher Query Language](https://docs.falkordb.com/cypher) for custom graph queries * * * --- # Features | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cloud/features.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cloud/features.html#features) Features =================================================================== [](https://docs.falkordb.com/cloud/features.html#multi-tenancy) Multi-Tenancy ----------------------------------------------------------------------------- Multi-tenancy lets you run multiple isolated graph databases within a single FalkorDB instance. Each tenant operates independently with its own data, queries, and access controls while sharing the underlying infrastructure. Developers building SaaS applications need multi-tenancy to serve multiple customers without deploying separate database instances for each one. This approach reduces operational overhead and infrastructure costs while maintaining strict data isolation between tenants. In practice, you create distinct graph databases for each customer or project, and FalkorDB handles the isolation automatically. [](https://docs.falkordb.com/cloud/features.html#cloud-providers) Cloud Providers --------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/cloud/features.html#aws) AWS FalkorDB runs on Amazon Web Services infrastructure, giving you access to AWS’s global network of data centers and integration with other AWS services. You can deploy FalkorDB instances in several AWS regions and connect them to your existing AWS resources. Teams already using AWS benefit from keeping their graph database in the same cloud environment as their applications. This setup reduces latency and simplifies network configuration since your services communicate within the AWS network. When you deploy on AWS, you choose your preferred region, and FalkorDB provisions the necessary compute and storage resources in that location. ### [](https://docs.falkordb.com/cloud/features.html#google-cloud-platform-gcp) Google Cloud Platform (GCP) FalkorDB integrates with Google Cloud Platform, allowing you to run graph databases on Google’s infrastructure. You gain access to GCP’s global network and can combine FalkorDB with other Google Cloud services. Organizations using GCP for their applications should deploy FalkorDB in the same cloud to maintain consistent infrastructure management. Keeping your database and applications on GCP reduces cross-cloud data transfer costs and latency. You select a GCP region during deployment, and FalkorDB sets up your graph database instance within Google’s infrastructure. > Note: Microsoft Azure is currently available in a Bring-Your-Own-Cloud configuration [](https://docs.falkordb.com/cloud/features.html#tls) TLS --------------------------------------------------------- TLS (Transport Layer Security) encrypts all data transmitted between your application and FalkorDB. This encryption prevents anyone intercepting network traffic from reading your queries or results. Applications handling sensitive data must use TLS to protect information in transit. Without encryption, credentials, personal data, and business logic become vulnerable when traveling across networks. When you enable TLS, FalkorDB requires encrypted connections. Your application must configure its database client to use TLS, and all communication happens over secure channels. [](https://docs.falkordb.com/cloud/features.html#vpc) VPC --------------------------------------------------------- A Virtual Private Cloud (VPC) creates an isolated network environment where your FalkorDB instance runs separately from the public internet. Only resources within your VPC or those you explicitly authorize can reach your database. Organizations with security requirements need VPC deployment to control network access to their databases. VPCs prevent unauthorized connection attempts and give you granular control over which services can communicate with FalkorDB. You deploy FalkorDB into your existing VPC, and the database becomes accessible only through your private network. Your applications connect using private IP addresses instead of public endpoints. [](https://docs.falkordb.com/cloud/features.html#persistence) Persistence ------------------------------------------------------------------------- Persistence ensures your graph data survives system restarts, crashes, or failures by writing changes to disk. Without persistence, you lose all data when the database stops. Any application storing important data requires persistence to maintain durability. In-memory-only databases lose everything during unexpected shutdowns, making them unsuitable for production workloads. FalkorDB persists data through regular snapshots and transaction logs. These mechanisms guarantee that committed transactions remain safe even if the system crashes immediately afterward. [](https://docs.falkordb.com/cloud/features.html#graph-browser) Graph Browser ----------------------------------------------------------------------------- You can connect to the falkordb browser (integrated into your web browser) from the cloud console. The browser allows visualizing query results, allows you to traverse the graph and more. Multi Graph support is enabled by default in the browser which simplifies navigation and data management. [](https://docs.falkordb.com/cloud/features.html#solution-architecture) Solution Architecture --------------------------------------------------------------------------------------------- Solution architecture support helps you design how FalkorDB integrates with your broader application infrastructure. This guidance covers connection patterns, data modeling approaches, and best practices for specific use cases. Teams building complex systems benefit from architectural advice to avoid common pitfalls and optimize their graph database implementation. Poor architectural decisions early in development create technical debt that becomes expensive to fix later. Architecture consultations provide recommendations on graph schema design, query optimization strategies, and integration patterns that match your application requirements. * * * --- # Enterprise Tier | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cloud/enterprise-tier.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs ![FalkorDB Cloud Enterprise Tier Banner](https://github.com/user-attachments/assets/f03bb001-1916-4e0f-9a82-cb8271309855) [](https://docs.falkordb.com/cloud/enterprise-tier.html#enterprise-tier) Enterprise Tier ======================================================================================== FalkorDB’s **Enterprise Tier** is designed for the most demanding workloads, offering ultimate performance, scale, and customization, with pricing determined on a **Custom** basis. This tier includes **every available enterprise feature**, such as **VPC Peering**, **Advanced Monitoring**, and **Dedicated Account Manager** support. The Enterprise Tier is fully optimized for mission-critical applications, providing the highest levels of security, availability, and dedicated operational support. Deployment configurations are tailored to your specific infrastructure, scale, and compliance requirements. [](https://docs.falkordb.com/cloud/enterprise-tier.html#falkordb-pricing-plans-comparison) FalkorDB Pricing Plans Comparison ---------------------------------------------------------------------------------------------------------------------------- | Feature | FREE | STARTUP | PRO | ENTERPRISE | | --- | --- | --- | --- | --- | | **Monthly Cost (from)** | **Free** | **$73** | **$350** | **Custom** | | Multi-Graph / Multi-Tenancy | ✓ | ✓ | ✓ | **🟢** | | Graph Access Control | ✓ | ✓ | ✓ | **🟢** | | **TLS** | ✗ | ✓ | ✓ | **🟢** | | **VPC** | ✗ | ✗ | ✗ | **🟢** | | Cluster Deployment | ✗ | ✗ | ✓ | **🟢** | | High Availability | ✗ | ✗ | ✓ | **🟢** | | Multi-zone Deployment | ✗ | ✗ | ✓ | **🟢** | | Scalability | ✗ | ✗ | ✓ | **🟢** | | Continuous Persistence | ✗ | ✗ | ✓ | **🟢** | | **Automated Backups** | ✗ | Every 12 Hours | Every 12 Hours | **Every Hour** | | **Advanced Monitoring** | ✗ | ✗ | ✗ | **🟢** | | **Support** | Community | Community | 24/7 | **Dedicated** | | **Dedicated Account Manager** | ✗ | ✗ | ✗ | **🟢** | | **Cloud Providers** | AWS, GCP, Azure | AWS, GCP, Azure | AWS, GCP, Azure | **AWS, GCP, Azure** | [](https://docs.falkordb.com/cloud/enterprise-tier.html#terms) Terms -------------------------------------------------------------------- ### [](https://docs.falkordb.com/cloud/enterprise-tier.html#consultation-and-pricing) Consultation and Pricing > The Enterprise Tier is customized to your specific needs, leveraging dedicated resources, tailored support SLAs, and private deployment options. Pricing is calculated based on the custom configuration of cores, memory, and additional enterprise components. > > **For precise pricing, deployment details, and a dedicated consultation:** **[Contact our Sales Team](https://www.falkordb.com/get-a-demo/) > ** > > ⚠️ Prices are subject to change [](https://docs.falkordb.com/cloud/enterprise-tier.html#getting-started) Getting Started ---------------------------------------------------------------------------------------- [![FalkorDB Graph DBaaS Enterprise Tier Tutorial Video](https://github.com/user-attachments/assets/d5519002-84ad-4076-9f64-150575d2eb7b)](https://www.youtube.com/watch?v=fu_8CLFKYSs) ⚙️ To begin your Enterprise journey, schedule a consultation: [![Contact Us](https://img.shields.io/badge/Contact%20Us-8A2BE2?style=for-the-badge)](mailto:info@falkordb.com) * * * --- # FalkorDBLite (TypeScript) | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#falkordblite-for-typescript) FalkorDBLite for TypeScript ================================================================================================================================== FalkorDBLite for Node.js/TypeScript launches an embedded `redis-server` with the FalkorDB module and returns a connected FalkorDB client. It is ideal for local development, demos, CI jobs, or small apps that want a zero-config graph database that starts and stops with the application. [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#requirements) Requirements ---------------------------------------------------------------------------------------------------- * Node.js 20 or later * Ability to download the FalkorDB module during `npm install` * Linux x64 and macOS arm64 are supported; Windows users should run under WSL2 or use a remote server [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#installation) Installation ---------------------------------------------------------------------------------------------------- npm install falkordblite # Optional: also install the remote client when you plan to connect to an external server npm install falkordb [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#quick-start) Quick start -------------------------------------------------------------------------------------------------- import { FalkorDB } from 'falkordblite'; const db = await FalkorDB.open(); const graph = db.selectGraph('quickstart'); await graph.query('CREATE (p:Person {name: "Ada"})'); const result = await graph.roQuery('MATCH (p:Person) RETURN p.name'); console.log(result.data); // => [ [ 'Ada' ] ] await db.close(); [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#persist-data-between-runs) Persist data between runs ------------------------------------------------------------------------------------------------------------------------------ Provide a path to keep data on disk. When set, FalkorDBLite enables periodic snapshots automatically. const db = await FalkorDB.open({ path: '/tmp/falkordb-lite' }); const graph = db.selectGraph('inventory'); await graph.query('CREATE (:Product {id: 1, name: \"Laptop\"})'); await db.close(); [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#work-with-multiple-graphs) Work with multiple graphs ------------------------------------------------------------------------------------------------------------------------------ Use separate graph IDs to isolate datasets within the same embedded instance. const db = await FalkorDB.open(); const users = db.selectGraph('users'); const orders = db.selectGraph('orders'); await users.query('CREATE (:User {id: 1, email: \"a@example.com\"})'); await orders.query('CREATE (:Order {id: 10, total: 99.5})'); await db.close(); [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#configuration-options) Configuration options ---------------------------------------------------------------------------------------------------------------------- Set options on `FalkorDB.open()` to control the embedded server: | Option | Type | Default | Purpose | | --- | --- | --- | --- | | `path` | `string` | temporary directory | Data directory; enables persistence and snapshots. | | `redisServerPath` | `string` | auto | Use a custom `redis-server` binary. | | `modulePath` | `string` | auto | Use a custom FalkorDB module (`.so`) path. | | `maxMemory` | `string` | unset | Redis `maxmemory`, e.g. `"256mb"`. | | `logLevel` | `'debug' \\| 'verbose' \\| 'notice' \\| 'warning'` | unset | Redis log level. | | `logFile` | `string` | standard output | Where the embedded server logs. | | `timeout` | `number` | `10000` | Startup timeout in milliseconds. | | `additionalConfig` | `Record` | none | Extra redis.conf entries (e.g. `{ port: '6379' }`). | | `falkordbVersion` | `string` | `v4.16.3` | FalkorDB module release tag to download. | | `inheritStdio` | `boolean` | `false` | Pipe `redis-server` output to the parent process. | The FalkorDB client returned by `selectGraph()` exposes the full FalkorDB Graph API (query, `roQuery`, indexes, constraints, profiling, etc.). [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#migrate-to-a-remote-falkordb-server) Migrate to a remote FalkorDB server -------------------------------------------------------------------------------------------------------------------------------------------------- Keep your graph logic and swap only the connection line: // Embedded import { FalkorDB } from 'falkordblite'; const db = await FalkorDB.open(); // Remote import { FalkorDB as RemoteFalkorDB } from 'falkordb'; const remote = await RemoteFalkorDB.connect({ socket: { host: '127.0.0.1', port: 6379 }, }); [](https://docs.falkordb.com/operations/falkordblite/falkordblite-ts.html#resources) Resources ---------------------------------------------------------------------------------------------- * [falkordblite-ts on GitHub](https://github.com/FalkorDB/falkordblite-ts) * [Package on npm](https://www.npmjs.com/package/falkordblite) * [Troubleshooting guide](https://github.com/FalkorDB/falkordblite-ts/blob/main/TROUBLESHOOTING.md) * * * --- # FOREACH | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/foreach.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/foreach.html#foreach) FOREACH ================================================================= The `FOREACH` clause feeds the components of a list to a sub-query comprised of **updating clauses only** (`CREATE`, `MERGE`, `SET`, `REMOVE`, `DELETE` and `FOREACH`), while passing on the records it receives without change. The clauses within the sub-query recognize the bound variables defined prior to the `FOREACH` clause, but are local in the sense that later clauses are not aware of the variables defined inside them. In other words, `FOREACH` uses the current context, and does not affect it. The `FOREACH` clause can be used for numerous purposes, such as: Updating and creating graph entities in a concise manner, marking nodes\\edges that satisfy some condition or are part of a path of interest and performing conditional queries. We show examples of queries performing the above 3 use-cases. The following query will create 4 nodes, each with property `v` with the values from 1 to 4 corresponding to the elements in the list. GRAPH.QUERY DEMO_GRAPH "FOREACH(i in [1, 2, 3, 4] | CREATE (n:N {v: i}))" The following query marks the nodes of all paths of length up to 15 km from a hotel in Toronto to a steakhouse with at least 2 Michelin stars. GRAPH.QUERY DEMO_GRAPH "MATCH p = (hotel:HOTEL {City: 'Toronto'})-[r:ROAD*..5]->(rest:RESTAURANT {type: 'Steakhouse'}) WHERE sum(r.length) <= 15 AND hotel.stars >= 4 AND rest.Michelin_stars >= 2 FOREACH(n in nodes(p) | SET n.part_of_path = true)" The following query searches for all the hotels, checks whether they buy directly from a bakery, and if not - makes sure they are marked as buying from a supplier that supplies bread, and that they do not buy directly from a bakery. GRAPH.QUERY DEMO_GRAPH "MATCH (h:HOTEL) OPTIONAL MATCH (h)-[b:BUYS_FROM]->(bakery:BAKERY) FOREACH(do_perform IN CASE WHEN b IS NULL THEN [1] ELSE [] END | MERGE (h)-[b2:BUYS_FROM]->(s:SUPPLIER {supplies_bread: true}) SET b2.direct = false)" * * * --- # Free Tier | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cloud/free-tier.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs ![FalkorDB Cloud Free Tier Banner](https://github.com/user-attachments/assets/062cb5c5-d969-4481-ab1b-1802fea0732a) [](https://docs.falkordb.com/cloud/free-tier.html#free-tier) Free Tier ====================================================================== FalkorDB’s free cloud tier gives you instant access to a graph database with multi-graph support and multi-tenancy capabilities. You can deploy on AWS or GCP with 100MB of storage and rely on community support to get started. The free tier provides everything you need to explore FalkorDB and build initial prototypes. When your application grows and requires TLS security, VPC networking, high availability, automated backups, or dedicated support, you can upgrade to a paid plan that includes these enterprise features. [](https://docs.falkordb.com/cloud/free-tier.html#falkordb-pricing-plans-comparison) FalkorDB Pricing Plans Comparison ---------------------------------------------------------------------------------------------------------------------- | Feature | FREE | STARTUP | PRO | ENTERPRISE | | --- | --- | --- | --- | --- | | **Monthly Cost (from)** | **Free** | **$73** | **$350** | **Custom** | | Multi-Graph / Multi-Tenancy | **✓** | **✓** | **✓** | **✓** | | Graph Access Control | **✓** | **✓** | **✓** | **✓** | | TLS | ✗ | **✓** | **✓** | **✓** | | VPC | ✗ | ✗ | ✗ | **✓** | | Cluster Deployment | ✗ | ✗ | **✓** | **✓** | | High Availability | ✗ | ✗ | **✓** | **✓** | | Multi-zone Deployment | ✗ | ✗ | **✓** | **✓** | | Scalability | ✗ | ✗ | **✓** | **✓** | | Continuous Persistence | ✗ | ✗ | **✓** | **✓** | | Automated Backups | ✗ | Every 12 Hours | Every 12 Hours | Every Hour | | Advanced Monitoring | ✗ | ✗ | ✗ | **✓** | | **Support** | Community | Community | 24/7 | Dedicated | | Dedicated Account Manager | ✗ | ✗ | ✗ | **✓** | | **Cloud Providers** | AWS, GCP | AWS, GCP | AWS, GCP | AWS, GCP, Azure | | **Call-to-Action** | [Sign up](https://app.falkordb.cloud/signup) | [Sign up](https://app.falkordb.cloud/signup) | [Sign up](https://app.falkordb.cloud/signup) | [Contact Us](mailto:info@falkordb.com) | ### [](https://docs.falkordb.com/cloud/free-tier.html#terms) Terms > ⚠️ Free instances that aren’t utilized for 1 day will be stopped, and deleted after 7 days. Need an extension? Speak to [sales](https://www.falkordb.com/get-a-demo/) [](https://docs.falkordb.com/cloud/free-tier.html#getting-started) Getting Started ---------------------------------------------------------------------------------- [![FalkorDB Graph DBaaS Free Tier Tutorial Video](https://github.com/user-attachments/assets/56255f72-ff9d-4863-9942-b839257a723c)](https://www.youtube.com/watch?v=z0XO4pb2t5Y) ⚙️ Spin up your first FalkorDB Cloud instance: [![Sign Up](https://img.shields.io/badge/Sign%20Up-8A2BE2?style=for-the-badge)](https://app.falkordb.cloud/signup) * * * --- # text.format | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/text/format.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/text/format.html#textformat) text.format =============================================================================== [](https://docs.falkordb.com/udfs/flex/text/format.html#description) Description -------------------------------------------------------------------------------- Formats a string by replacing numbered placeholders `{0}`, `{1}`, `{2}`, etc. with corresponding values from a parameters array. Similar to sprintf-style formatting. [](https://docs.falkordb.com/udfs/flex/text/format.html#syntax) Syntax ---------------------------------------------------------------------- flex.text.format(template, parameters) [](https://docs.falkordb.com/udfs/flex/text/format.html#parameters) Parameters ------------------------------------------------------------------------------ | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `template` | string | Yes | The format string containing `{0}`, `{1}`, etc. placeholders | | `parameters` | list | Yes | Array of values to substitute into the template | [](https://docs.falkordb.com/udfs/flex/text/format.html#returns) Returns ------------------------------------------------------------------------ **Type:** string The formatted string with placeholders replaced by parameter values. Returns `null` if template is `null`. [](https://docs.falkordb.com/udfs/flex/text/format.html#examples) Examples -------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/text/format.html#example-1-basic-string-formatting) Example 1: Basic String Formatting RETURN flex.text.format('Hello {0}, you are {1} years old!', ['Alice', 30]) AS result **Output:** result -------------------------------- Hello Alice, you are 30 years old! ### [](https://docs.falkordb.com/udfs/flex/text/format.html#example-2-dynamic-query-messages) Example 2: Dynamic Query Messages MATCH (u:User {id: 123}) WITH u, flex.text.format('User {0} ({1}) logged in at {2}', [u.name, u.email, u.lastLogin]) AS message RETURN message ### [](https://docs.falkordb.com/udfs/flex/text/format.html#example-3-building-urls-or-paths) Example 3: Building URLs or Paths WITH ['users', 'profile', '12345'] AS parts RETURN flex.text.format('/{0}/{1}/{2}', parts) AS path **Output:** path ------------------------ /users/profile/12345 [](https://docs.falkordb.com/udfs/flex/text/format.html#notes) Notes -------------------------------------------------------------------- * Returns `null` if template is `null` * Placeholders are zero-indexed: `{0}`, `{1}`, `{2}`, etc. * Same placeholder can be used multiple times in template * Parameters are replaced in order of array index * Useful for building dynamic messages, logs, or formatted output [](https://docs.falkordb.com/udfs/flex/text/format.html#see-also) See Also -------------------------------------------------------------------------- * [text.replace](https://docs.falkordb.com/udfs/flex/text/replace.html) - Replace text using regex patterns * [text.join](https://docs.falkordb.com/udfs/flex/text/join.html) - Join array elements with delimiter * * * --- # date.format | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/date/format.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/date/format.html#dateformat) date.format =============================================================================== [](https://docs.falkordb.com/udfs/flex/date/format.html#description) Description -------------------------------------------------------------------------------- Formats a date/time value using a simple token-based pattern. Supports common date/time tokens and optional timezone offset adjustment. [](https://docs.falkordb.com/udfs/flex/date/format.html#syntax) Syntax ---------------------------------------------------------------------- flex.date.format(datetime, pattern, timezone) [](https://docs.falkordb.com/udfs/flex/date/format.html#parameters) Parameters ------------------------------------------------------------------------------ | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `datetime` | Date/number/string | Yes | The date/time value to format | | `pattern` | string | No | Format pattern using tokens (default: `'YYYY-MM-DDTHH:mm:ss[Z]'`) | | `timezone` | string | No | Timezone offset like `"+02:00"` or `"-05:00"` | ### [](https://docs.falkordb.com/udfs/flex/date/format.html#supported-pattern-tokens) Supported Pattern Tokens | Token | Description | Example | | --- | --- | --- | | `YYYY` | 4-digit year | `2024` | | `MM` | 2-digit month (01-12) | `03` | | `DD` | 2-digit day (01-31) | `15` | | `HH` | 2-digit hour (00-23) | `14` | | `mm` | 2-digit minute (00-59) | `30` | | `ss` | 2-digit second (00-59) | `45` | | `SSS` | 3-digit milliseconds | `123` | | `[Z]` | Literal `Z` character | `Z` | [](https://docs.falkordb.com/udfs/flex/date/format.html#returns) Returns ------------------------------------------------------------------------ **Type:** string A formatted date/time string according to the pattern. Returns `null` if the input date is invalid. [](https://docs.falkordb.com/udfs/flex/date/format.html#examples) Examples -------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/date/format.html#example-1-basic-date-formatting) Example 1: Basic Date Formatting WITH datetime('2024-03-15T14:30:00Z') AS dt RETURN flex.date.format(dt, 'YYYY-MM-DD') AS date **Output:** date ---------- 2024-03-15 ### [](https://docs.falkordb.com/udfs/flex/date/format.html#example-2-full-datetime-with-time) Example 2: Full DateTime with Time WITH datetime('2024-03-15T14:30:45Z') AS dt RETURN flex.date.format(dt, 'YYYY-MM-DD HH:mm:ss') AS formatted **Output:** formatted ------------------- 2024-03-15 14:30:45 ### [](https://docs.falkordb.com/udfs/flex/date/format.html#example-3-custom-format-with-timezone) Example 3: Custom Format with Timezone WITH datetime('2024-03-15T14:30:00Z') AS dt RETURN flex.date.format(dt, 'DD/MM/YYYY HH:mm', '+02:00') AS localTime **Output:** localTime ----------------- 15/03/2024 16:30 (Adjusted for +02:00 timezone) ### [](https://docs.falkordb.com/udfs/flex/date/format.html#example-4-formatting-node-timestamps) Example 4: Formatting Node Timestamps MATCH (e:Event) RETURN e.name, flex.date.format(e.timestamp, 'YYYY-MM-DD') AS eventDate ORDER BY e.timestamp DESC [](https://docs.falkordb.com/udfs/flex/date/format.html#notes) Notes -------------------------------------------------------------------- * Returns `null` for invalid date inputs * Default pattern is ISO8601-like: `'YYYY-MM-DDTHH:mm:ss[Z]'` * Timezone parameter adjusts the displayed time for the given offset * All calculations are UTC-based internally * Milliseconds are optional in the pattern [](https://docs.falkordb.com/udfs/flex/date/format.html#see-also) See Also -------------------------------------------------------------------------- * [date.parse](https://docs.falkordb.com/udfs/flex/date/parse.html) - Parse string to date * [date.truncate](https://docs.falkordb.com/udfs/flex/date/truncate.html) - Truncate date to specific unit * [date.toTimeZone](https://docs.falkordb.com/udfs/flex/date/toTimeZone.html) - Convert date to timezone * * * --- # Client Libraries | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/getting-started/clients.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/getting-started/clients.html#official-clients) Official Clients ============================================================================================ | Project | Docs | Language | License | Author | Package | | --- | --- | --- | --- | --- | --- | | [falkordb-py](https://github.com/falkordb/falkordb-py) | [Pydoc](https://falkordb-py.readthedocs.io/en/latest/) | Python | MIT | [FalkorDB](https://www.falkordb.com/) | [pypi](https://pypi.python.org/pypi/falkordb) | | [falkordb-ts](https://github.com/falkordb/falkordb-ts) | [JSDoc](https://www.npmjs.com/package/falkordb) | Node.JS | MIT | [FalkorDB](https://www.falkordb.com/) | [npm](https://www.npmjs.com/package/falkordb) | | [jfalkordb](https://github.com/falkordb/jfalkordb) | [javadocs](https://www.javadoc.io/doc/com.falkordb/jfalkordb) | Java | BSD | [FalkorDB](https://www.falkordb.com/) | [maven](https://search.maven.org/artifact/com.falkordb/jfalkordb) | | [falkordb-rs](https://github.com/falkordb/falkordb-rs) | [docs.rs](https://docs.rs/falkordb/latest/falkordb) | Rust | MIT | [FalkorDB](https://www.falkordb.com/) | [crates](https://crates.io/crates/falkordb) | | [falkordb-go](https://github.com/falkordb/falkordb-go) | [godoc](https://pkg.go.dev/github.com/FalkorDB/falkordb-go) | Go | BSD | [FalkorDB](https://www.falkordb.com/) | [Github](https://github.com/falkordb/falkordb-go) | | [NFalkorDB](https://github.com/falkordb/NFalkorDB) | [readme](https://github.com/FalkorDB/NFalkorDB/blob/master/README.md) | C# | Apache-2.0 | [FalkorDB](https://www.falkordb.com/) | [nuget](https://www.nuget.org/packages/NFalkorDB) | [](https://docs.falkordb.com/getting-started/clients.html#official-object-graph-mapping-ogm-libraries) Official Object-Graph Mapping (OGM) Libraries ---------------------------------------------------------------------------------------------------------------------------------------------------- FalkorDB provides official Object-Graph Mapping (OGM) libraries that allow you to work with graph data using native language objects and structures. | Project | Docs | Language | License | Author | Package | | --- | --- | --- | --- | --- | --- | | [falkordb-py-orm](https://github.com/FalkorDB/falkordb-py-orm) | [readme](https://github.com/FalkorDB/falkordb-py-orm#readme) | Python | MIT | [FalkorDB](https://www.falkordb.com/) | [GitHub](https://github.com/FalkorDB/falkordb-py-orm) | | [falkordb-go-orm](https://github.com/FalkorDB/falkordb-go-orm) | [readme](https://github.com/FalkorDB/falkordb-go-orm#readme) | Go | MIT | [FalkorDB](https://www.falkordb.com/) | [GitHub](https://github.com/FalkorDB/falkordb-go-orm) | | [spring-data-falkordb](https://github.com/FalkorDB/spring-data-falkordb) | [readme](https://github.com/FalkorDB/spring-data-falkordb#readme) | Java | Apache-2.0 | [FalkorDB](https://www.falkordb.com/) | [GitHub](https://github.com/FalkorDB/spring-data-falkordb) | [](https://docs.falkordb.com/getting-started/clients.html#additional-clients) Additional Clients ------------------------------------------------------------------------------------------------ | Project | Language | License | Author | Package | | --- | --- | --- | --- | --- | | [nredisstack](https://github.com/redis/nredisstack) | .NET | MIT | [Redis](https://redis.com/) | [nuget](https://www.nuget.org/packages/nredisstack/) | | [falkordb\_ex](https://github.com/georgfaust/falkordb_ex) | Elixir | MIT | [Sebastian](https://github.com/georgfaust) | [GitHub](https://github.com/georgfaust/falkordb_ex) | | [redisgraph-rb](https://github.com/RedisGraph/redisgraph-rb) | Ruby | BSD | [Redis](https://redislabs.com/) | [GitHub](https://github.com/RedisGraph/redisgraph-rb) | | [redgraph](https://github.com/pzac/redgraph) | Ruby | MIT | [pzac](https://github.com/pzac) | [GitHub](https://github.com/pzac/redgraph) | | [redisgraph-go](https://github.com/RedisGraph/redisgraph-go) | Go | BSD | [Redis](https://redislabs.com/) | [GitHub](https://github.com/RedisGraph/redisgraph-go) | | [rueidis](https://github.com/rueian/rueidis) | Go | Apache 2.0 | [Rueian](https://github.com/rueian) | [GitHub](https://github.com/rueian/rueidis) | | [ioredisgraph](https://github.com/Jonahss/ioredisgraph) | JavaScript | ISC | [Jonah](https://github.com/Jonahss) | [GitHub](https://github.com/Jonahss/ioredisgraph) | | [@hydre/rgraph](https://github.com/HydreIO/rgraph) | JavaScript | MIT | [Sceat](https://github.com/Sceat) | [GitHub](https://github.com/HydreIO/rgraph) | | [drivine](https://github.com/liberation-data/drivine) | TypeScript | Apache 2.0 | [liberation-data](https://github.com/liberation-data) | [npm](https://www.npmjs.com/package/@liberation-data/drivine) | | [php-redis-graph](https://github.com/kjdev/php-redis-graph) | PHP | MIT | [KJDev](https://github.com/kjdev) | [GitHub](https://github.com/kjdev/php-redis-graph) | | [redisgraph\_php](https://github.com/jpbourbon/redisgraph_php) | PHP | MIT | [jpbourbon](https://github.com/jpbourbon) | [GitHub](https://github.com/jpbourbon/redisgraph_php) | | [redisgraph-ex](https://github.com/crflynn/redisgraph-ex) | Elixir | MIT | [crflynn](https://github.com/crflynn) | [GitHub](https://github.com/crflynn/redisgraph-ex) | | [redisgraph-rs](https://github.com/malte-v/redisgraph-rs) | Rust | MIT | [malte-v](https://github.com/malte-v) | [GitHub](https://github.com/malte-v/redisgraph-rs) | | [redis\_graph](https://github.com/tompro/redis_graph) | Rust | BSD | [tompro](https://github.com/tompro) | [GitHub](https://github.com/tompro/redis_graph) | | [rustis](https://github.com/dahomey-technologies/rustis) | Rust | MIT | [Dahomey Technologies](https://github.com/dahomey-technologies) | [Crate](https://crates.io/crates/rustis) | | [NRedisGraph](https://github.com/tombatron/NRedisGraph) | C# | BSD | [tombatron](https://github.com/tombatron) | [GitHub](https://github.com/tombatron/NRedisGraph) | | [RedisGraph.jl](https://github.com/xyxel/RedisGraph.jl) | Julia | MIT | [xyxel](https://github.com/xyxel) | [GitHub](https://github.com/xyxel/RedisGraph.jl) | [](https://docs.falkordb.com/getting-started/clients.html#implementing-a-client) Implementing a client ------------------------------------------------------------------------------------------------------ Information on some of the tasks involved in writing a FalkorDB client can be found in the [Client Specification](https://docs.falkordb.com/design/client-spec) . * * * --- # json.fromJsonList | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#jsonfromjsonlist) json.fromJsonList ================================================================================================= [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#description) Description -------------------------------------------------------------------------------------- Parses a JSON string and returns it as a list (array). Safely handles malformed JSON by returning an empty list on parse errors. [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#syntax) Syntax ---------------------------------------------------------------------------- flex.json.fromJsonList(jsonString) [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#parameters) Parameters ------------------------------------------------------------------------------------ | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `jsonString` | string | Yes | A JSON string representing an array | [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#returns) Returns ------------------------------------------------------------------------------ **Type:** list A list parsed from the JSON string. Returns an empty list `[]` if parsing fails or if the input is not a valid JSON array. [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#examples) Examples -------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#example-1-basic-json-array-parsing) Example 1: Basic JSON Array Parsing WITH '[1, 2, 3, 4, 5]' AS json RETURN flex.json.fromJsonList(json) AS numbers **Output:** numbers ----------- [1, 2, 3, 4, 5] ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#example-2-parsing-complex-arrays) Example 2: Parsing Complex Arrays WITH '[{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}]' AS json WITH flex.json.fromJsonList(json) AS users UNWIND users AS user RETURN user.id, user.name ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#example-3-processing-stored-list-data) Example 3: Processing Stored List Data MATCH (p:Product) WHERE p.tagsJson IS NOT NULL WITH p, flex.json.fromJsonList(p.tagsJson) AS tags UNWIND tags AS tag RETURN p.name, tag ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#example-4-handling-malformed-json) Example 4: Handling Malformed JSON WITH '[invalid, json]' AS badJson RETURN flex.json.fromJsonList(badJson) AS result **Output:** result ------ [] (Returns empty list for invalid JSON) [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#notes) Notes -------------------------------------------------------------------------- * Returns empty list `[]` if input is not valid JSON * Returns empty list if the JSON represents a non-array value (e.g., object, string) * Safe to use without error handling as it won’t throw exceptions * Useful for parsing list data, batch imports, or stored JSON arrays [](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html#see-also) See Also -------------------------------------------------------------------------------- * [json.fromJsonMap](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html) - Parse JSON string to map * [json.toJson](https://docs.falkordb.com/udfs/flex/json/toJson.html) - Serialize value to JSON string * * * --- # json.fromJsonMap | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#jsonfromjsonmap) json.fromJsonMap ============================================================================================== [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#description) Description ------------------------------------------------------------------------------------- Parses a JSON string and returns it as a map (object). Safely handles malformed JSON by returning an empty map on parse errors. [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#syntax) Syntax --------------------------------------------------------------------------- flex.json.fromJsonMap(jsonString) [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#parameters) Parameters ----------------------------------------------------------------------------------- | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `jsonString` | string | Yes | A JSON string representing an object | [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#returns) Returns ----------------------------------------------------------------------------- **Type:** map (object) A map parsed from the JSON string. Returns an empty map `{}` if parsing fails or if the input is not a valid JSON object. [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#examples) Examples ------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#example-1-basic-json-parsing) Example 1: Basic JSON Parsing WITH '{"name":"Alice","age":30,"active":true}' AS json RETURN flex.json.fromJsonMap(json) AS user **Output:** user ------------------------------- {name: 'Alice', age: 30, active: true} ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#example-2-parsing-stored-json-properties) Example 2: Parsing Stored JSON Properties MATCH (n:Node) WHERE n.jsonData IS NOT NULL WITH n, flex.json.fromJsonMap(n.jsonData) AS parsed RETURN n.id, parsed.field1, parsed.field2 ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#example-3-processing-api-responses) Example 3: Processing API Responses WITH '{"id":123,"email":"user@example.com","role":"admin"}' AS apiResponse WITH flex.json.fromJsonMap(apiResponse) AS data CREATE (u:User {id: data.id, email: data.email, role: data.role}) ### [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#example-4-handling-malformed-json) Example 4: Handling Malformed JSON WITH '{invalid json}' AS badJson RETURN flex.json.fromJsonMap(badJson) AS result **Output:** result ------ {} (Returns empty map for invalid JSON) [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#notes) Notes ------------------------------------------------------------------------- * Returns empty map `{}` if input is not valid JSON * Returns empty map if the JSON represents a non-object value (e.g., array, string) * Safe to use without error handling as it won’t throw exceptions * Useful for parsing configuration, API responses, or stored JSON data [](https://docs.falkordb.com/udfs/flex/json/fromJsonMap.html#see-also) See Also ------------------------------------------------------------------------------- * [json.fromJsonList](https://docs.falkordb.com/udfs/flex/json/fromJsonList.html) - Parse JSON string to list * [json.toJson](https://docs.falkordb.com/udfs/flex/json/toJson.html) - Serialize value to JSON string * * * --- # coll.frequencies | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#collfrequencies) coll.frequencies ===================================================================================================== [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#description) Description -------------------------------------------------------------------------------------------- Counts the frequency of each element in a list, returning a map where keys are the unique elements and values are their occurrence counts. [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#syntax) Syntax ---------------------------------------------------------------------------------- flex.coll.frequencies(list) [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#parameters) Parameters ------------------------------------------------------------------------------------------ | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `list` | list | Yes | The list to analyze | [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#returns) Returns ------------------------------------------------------------------------------------ **Type:** map (object) A map where each key is a unique element from the list and each value is the count of how many times that element appears. Returns an empty map if input is not an array. [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#examples) Examples -------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#example-1-basic-frequency-count) Example 1: Basic Frequency Count WITH ['apple', 'banana', 'apple', 'cherry', 'banana', 'apple'] AS fruits RETURN flex.coll.frequencies(fruits) AS counts **Output:** counts --------------------------------------- {apple: 3, banana: 2, cherry: 1} ### [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#example-2-tag-analysis) Example 2: Tag Analysis MATCH (d:Document) WITH collect(d.tags) AS allTagLists UNWIND allTagLists AS tags UNWIND tags AS tag WITH collect(tag) AS flatTags RETURN flex.coll.frequencies(flatTags) AS tagCounts ### [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#example-3-finding-most-common-values) Example 3: Finding Most Common Values MATCH (u:User) WITH collect(u.country) AS countries WITH flex.coll.frequencies(countries) AS freq UNWIND keys(freq) AS country RETURN country, freq[country] AS count ORDER BY count DESC LIMIT 10 ### [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#example-4-word-frequency-analysis) Example 4: Word Frequency Analysis MATCH (doc:Document) WITH split(toLower(doc.content), ' ') AS words WITH flex.coll.frequencies(words) AS wordCounts UNWIND keys(wordCounts) AS word WHERE wordCounts[word] > 5 RETURN word, wordCounts[word] AS frequency ORDER BY frequency DESC [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#notes) Notes -------------------------------------------------------------------------------- * Returns empty map if input is not an array or is `null` * `null` and `undefined` values are stored with key `"null"` * All elements are converted to string keys in the result map * Useful for analytics, statistics, and data exploration * Can be combined with `keys()` and sorting for top-N analysis [](https://docs.falkordb.com/udfs/flex/collections/frequencies.html#see-also) See Also -------------------------------------------------------------------------------------- * [coll.union](https://docs.falkordb.com/udfs/flex/collections/union.html) - Get unique elements (keys would give unique items) * [coll.intersection](https://docs.falkordb.com/udfs/flex/collections/intersection.html) - Find common elements * * * --- # Main Graph Canvas | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/ui/graph-canvas.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/ui/graph-canvas.html#main-graph-canvas) Main Graph Canvas ============================================================================================== The **Graph** results tab renders your query results as an interactive node/edge visualization. [](https://docs.falkordb.com/browser/ui/graph-canvas.html#core-interactions) Core interactions ---------------------------------------------------------------------------------------------- * **Pan/zoom** the canvas to explore results. * **Select** nodes/edges to inspect them (opens the Data panel). * **Right-click / context menu** is used in the tutorial flow to open element details. [](https://docs.falkordb.com/browser/ui/graph-canvas.html#labels--relationships-filters) Labels & Relationships filters ----------------------------------------------------------------------------------------------------------------------- When you have results, the overlay includes: * **Labels** list: toggle visibility of nodes by label. * **Relationships** list: toggle visibility of edges by relationship type. These toggles update visibility on the canvas without re-running the query. [](https://docs.falkordb.com/browser/ui/graph-canvas.html#canvas-controls) Canvas controls ------------------------------------------------------------------------------------------ The controls area includes: * **Animation control** (play/pause force-layout delay) * **Zoom in / Zoom out** * **Center / fit to screen** [](https://docs.falkordb.com/browser/ui/graph-canvas.html#tabs-around-the-canvas) Tabs around the canvas -------------------------------------------------------------------------------------------------------- From the same results region you can switch to: * **Table** view (when tabular data exists) * **Metadata** view (when metadata/explain exists) * * * --- # Client Specification | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/design/client-spec.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/design/client-spec.html#client-specification) Client Specification =============================================================================================== By design, there is not a full standard for FalkorDB clients to adhere to. Areas such as pretty-print formatting, query validation, and transactional and multithreaded capabilities have no canonically correct behavior, and the implementer is free to choose the approach and complexity that suits them best. FalkorDB does, however, provide a compact result set format for clients that minimizes the amount of redundant data transmitted from the server. Implementers are encouraged to take advantage of this format, as it provides better performance and removes ambiguity from decoding certain data. This approach requires clients to be capable of issuing procedure calls to the server and performing a small amount of client-side caching. [](https://docs.falkordb.com/design/client-spec.html#retrieving-the-compact-result-set) Retrieving the compact result set ------------------------------------------------------------------------------------------------------------------------- Appending the flag `--compact` to any query issued to the GRAPH.QUERY endpoint will cause the server to issue results in the compact format. Because we don’t store connection-specific configurations, all queries should be issued with this flag. GRAPH.QUERY demo "MATCH (a) RETURN a" --compact [](https://docs.falkordb.com/design/client-spec.html#formatting-differences-in-the-compact-result-set) Formatting differences in the compact result set ------------------------------------------------------------------------------------------------------------------------------------------------------- Certain values are emitted as integer IDs rather than strings: 1. Node labels 2. Relationship types 3. Property keys Instructions on how to efficiently convert these IDs in the [Procedure Calls](https://docs.falkordb.com/design/client-spec.html#procedure-calls) section below. Additionally, two enums are exposed: [ColumnType](https://github.com/FalkorDB/FalkorDB/blob/ff108d7e21061025166a35d29be1a1cb5bac6d55/src/resultset/formatters/resultset_formatter.h#L14-L19) , which as of v2.1.0 will always be `COLUMN_SCALAR`. This enum is retained for backwards compatibility, and may be ignored by the client unless versions older than v2.1.0 must be supported. [ValueType](https://github.com/FalkorDB/FalkorDB/blob/ff108d7e21061025166a35d29be1a1cb5bac6d55/src/resultset/formatters/resultset_formatter.h#L21-L28) indicates the data type (such as Node, integer, or string) of each returned value. Each value is emitted as a 2-array, with this enum in the first position and the actual value in the second. Each property on a graph entity also has a scalar as its value, so this construction is nested in each value of the properties array when a column contains a node or relationship. [](https://docs.falkordb.com/design/client-spec.html#decoding-the-result-set) Decoding the result set ----------------------------------------------------------------------------------------------------- Given the graph created by the query: GRAPH.QUERY demo "CREATE (:plant {name: 'Tree'})-[:GROWS {season: 'Autumn'}]->(:fruit {name: 'Apple'})" Let’s formulate a query that returns 3 columns: nodes, relationships, and scalars, in that order. Verbose (default): 127.0.0.1:6379> GRAPH.QUERY demo "MATCH (a)-[e]->(b) RETURN a, e, b.name" 1) 1) "a" 2) "e" 3) "b.name" 2) 1) 1) 1) 1) "id" 2) (integer) 0 2) 1) "labels" 2) 1) "plant" 3) 1) "properties" 2) 1) 1) "name" 2) "Tree" 2) 1) 1) "id" 2) (integer) 0 2) 1) "type" 2) "GROWS" 3) 1) "src_node" 2) (integer) 0 4) 1) "dest_node" 2) (integer) 1 5) 1) "properties" 2) 1) 1) "season" 2) "Autumn" 3) "Apple" 3) 1) "Query internal execution time: 1.326905 milliseconds" Compact: 127.0.0.1:6379> GRAPH.QUERY demo "MATCH (a)-[e]->(b) RETURN a, e, b.name" --compact 1) 1) 1) (integer) 1 2) "a" 2) 1) (integer) 1 2) "e" 3) 1) (integer) 1 2) "b.name" 2) 1) 1) 1) (integer) 8 2) 1) (integer) 0 2) 1) (integer) 0 3) 1) 1) (integer) 0 2) (integer) 2 3) "Tree" 2) 1) (integer) 7 2) 1) (integer) 0 2) (integer) 0 3) (integer) 0 4) (integer) 1 5) 1) 1) (integer) 1 2) (integer) 2 3) "Autumn" 3) 1) (integer) 2 2) "Apple" 3) 1) "Query internal execution time: 1.085412 milliseconds" These results are being parsed by `redis-cli`, which adds such visual cues as array indexing and indentation, as well as type hints like `(integer)`. The actual data transmitted is formatted using the [RESP protocol](https://redis.io/topics/protocol) . All of the current FalkorDB clients rely upon a stable Redis client in the same language (such as [redis-rb](https://github.com/redis/redis-rb) for Ruby) which handles RESP decoding. ### [](https://docs.falkordb.com/design/client-spec.html#top-level-array-results) Top-level array results The result set above had 3 members in its top-level array: 1) Header row 2) Result rows 3) Query statistics All queries that have a `RETURN` clause will have these 3 members. Queries that don’t return results have only one member in the outermost array, the query statistics: 127.0.0.1:6379> GRAPH.QUERY demo "CREATE (:plant {name: 'Tree'})-[:GROWS {season: 'Autumn'}]->(:fruit {name: 'Apple'})" --compact 1) 1) "Labels added: 2" 2) "Nodes created: 2" 3) "Properties set: 3" 4) "Relationships created: 1" 5) "Query internal execution time: 1.972868 milliseconds" Rather than introspecting on the query being emitted, the client implementation can check whether this array contains 1 or 3 elements to choose how to format data. ### [](https://docs.falkordb.com/design/client-spec.html#reading-the-header-row) Reading the header row Our sample query `MATCH (a)-[e]->(b) RETURN a, e, b.name` generated the header: 1) 1) (integer) 1 2) "a" 3) 1) (integer) 1 3) "e" 4) 1) (integer) 1 3) "b.name" The 3 array members correspond, in order, to the 3 entities described in the RETURN clause. Each is emitted as a 2-array: 1) ColumnType (enum) 2) column name (string) The first element is the [ColumnType enum](https://github.com/FalkorDB/FalkorDB/blob/master/src/resultset/formatters/resultset_formatter.h#L14-L19) , which as of RedisGraph v2.1.0 will always be `COLUMN_SCALAR`. This element is retained for backwards compatibility, and may be ignored by the client unless RedisGraph versions older than v2.1.0 must be supported. ### [](https://docs.falkordb.com/design/client-spec.html#reading-result-rows) Reading result rows The entity representations in this section will closely resemble those found in [Result Set Graph Entities](https://docs.falkordb.com/design/result-structure#graph-entities) . Our query produced one row of results with 3 columns (as described by the header): 1) 1) 1) (integer) 8 2) 1) (integer) 0 2) 1) (integer) 0 3) 1) 1) (integer) 0 2) (integer) 2 3) "Tree" 2) 1) (integer) 7 2) 1) (integer) 0 2) (integer) 0 3) (integer) 0 4) (integer) 1 5) 1) 1) (integer) 1 2) (integer) 2 3) "Autumn" 3) 1) (integer) 2 2) "Apple" Each element is emitted as a 2-array - \[`ValueType`, value\]. It is the client’s responsibility to store the [ValueType enum](https://github.com/FalkorDB/FalkorDB/blob/master/src/resultset/formatters/resultset_formatter.h#L21-L28) . FalkorDB guarantees that this enum may be extended in the future, but the existing values will not be altered. The `ValueType` for the first entry is `VALUE_NODE`. The node representation contains 3 top-level elements: 1. The node’s internal ID. 2. An array of all label IDs associated with the node (currently, each node can have either 0 or 1 labels, though this restriction may be lifted in the future). 3. An array of all properties the node contains. Properties are represented as 3-arrays - \[property key ID, `ValueType`, value\]. [ \ Node ID (integer),\ [label ID (integer) X label count]\ [[property key ID (integer), ValueType (enum), value (scalar)] X property count]\ ] The `ValueType` for the second entry is `VALUE_EDGE`. The edge representation differs from the node representation in two respects: * Each relation has exactly one type, rather than the 0+ labels a node may have. * A relation is emitted with the IDs of its source and destination nodes. As such, the complete representation is as follows: 1. The relation’s internal ID. 2. The relationship type ID. 3. The source node’s internal ID. 4. The destination node’s internal ID. 5. The key-value pairs of all properties the relation possesses. [ \ Relation ID (integer),\ type ID (integer),\ source node ID (integer),\ destination node ID (integer),\ [[property key ID (integer), ValueType (enum), value (scalar)] X property count]\ ] The `ValueType` for the third entry is `VALUE_STRING`, and the other element in the array is the actual value, “Apple”. ### [](https://docs.falkordb.com/design/client-spec.html#reading-statistics) Reading statistics The final top-level member of the GRAPH.QUERY reply is the execution statistics. This element is identical between the compact and standard response formats. The statistics always include query execution time, while any combination of the other elements may be included depending on how the graph was modified. 1. “Labels added: (integer)” 2. “Labels removed: (integer)” (since RedisGraph 2.10) 3. “Nodes created: (integer)” 4. “Nodes deleted: (integer)” 5. “Properties set: (integer)” 6. “Properties removed: (integer)” (since RedisGraph 2.10) 7. “Relationships created: (integer)” 8. “Relationships deleted: (integer)” 9. “Indices created: (integer)” 10. “Indices deleted: (integer)” 11. “Query internal execution time: (float) milliseconds” [](https://docs.falkordb.com/design/client-spec.html#procedure-calls) Procedure Calls ------------------------------------------------------------------------------------- Property keys, node labels, and relationship types are all returned as IDs rather than strings in the compact format. For each of these 3 string-ID mappings, IDs start at 0 and increase monotonically. As such, the client should store a string array for each of these 3 mappings, and print the appropriate string for the user by checking an array at position _ID_. If an ID greater than the array length is encountered, the local array should be updated with a procedure call. These calls are described generally in the [Procedures documentation](https://docs.falkordb.com/commands/graph.query#procedures) . To retrieve each full mapping, the appropriate calls are: `db.labels()` 127.0.0.1:6379> GRAPH.QUERY demo "CALL db.labels()" 1) 1) "label" 2) 1) 1) "plant" 2) 1) "fruit" 3) 1) "Query internal execution time: 0.321513 milliseconds" `db.relationshipTypes()` 127.0.0.1:6379> GRAPH.QUERY demo "CALL db.relationshipTypes()" 1) 1) "relationshipType" 2) 1) 1) "GROWS" 3) 1) "Query internal execution time: 0.429677 milliseconds" `db.propertyKeys()` 127.0.0.1:6379> GRAPH.QUERY demo "CALL db.propertyKeys()" 1) 1) "propertyKey" 2) 1) 1) "name" 2) 1) "season" 3) 1) "Query internal execution time: 0.318940 milliseconds" Because the cached values never become outdated, it is possible to just retrieve new values with slightly more complex constructions: CALL db.propertyKeys() YIELD propertyKey RETURN propertyKey SKIP [cached_array_length] Though the property calls are quite efficient regardless of whether this optimization is used. As an example, the Python client checks its local array of labels to resolve every label ID [as seen here](https://github.com/RedisGraph/redisgraph-py/blob/d65ec325b1909489845427b7100dcba6c4050b66/redisgraph/graph.py#L20-L32) . In the case of an IndexError, it issues a procedure call to fully refresh its label cache [as seen here](https://github.com/RedisGraph/redisgraph-py/blob/d65ec325b1909489845427b7100dcba6c4050b66/redisgraph/graph.py#L153-L154) . [](https://docs.falkordb.com/design/client-spec.html#reference-clients) Reference clients ----------------------------------------------------------------------------------------- All the logic described in this document has been implemented in most of the clients listed in [Client Libraries](https://docs.falkordb.com/getting-started/clients) . Among these, the official FalkorDB clients for Python, Node.js, and Java are currently the most sophisticated. * * * --- # map.fromPairs | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#mapfrompairs) map.fromPairs ===================================================================================== [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#description) Description ---------------------------------------------------------------------------------- Converts a list of key-value pairs into a map. Each pair should be a two-element array `[key, value]`. [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#syntax) Syntax ------------------------------------------------------------------------ flex.map.fromPairs(pairs) [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#parameters) Parameters -------------------------------------------------------------------------------- | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `pairs` | list | Yes | A list of two-element arrays, each containing `[key, value]` | [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#returns) Returns -------------------------------------------------------------------------- **Type:** map (object) A map where each key-value pair from the input list becomes a property. Returns an empty map if input is not an array. [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#examples) Examples ---------------------------------------------------------------------------- ### [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#example-1-basic-conversion) Example 1: Basic Conversion WITH [['name', 'Alice'], ['age', 30], ['city', 'NYC']] AS pairs RETURN flex.map.fromPairs(pairs) AS result **Output:** result ------------------------------------ {name: 'Alice', age: 30, city: 'NYC'} ### [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#example-2-converting-zipped-data) Example 2: Converting Zipped Data WITH ['name', 'age', 'email'] AS keys, ['Bob', 25, 'bob@example.com'] AS values WITH flex.coll.zip(keys, values) AS pairs RETURN flex.map.fromPairs(pairs) AS user **Output:** user ------------------------------------------ {name: 'Bob', age: 25, email: 'bob@example.com'} ### [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#example-3-dynamic-property-creation) Example 3: Dynamic Property Creation MATCH (p:Product) WITH collect([p.id, p.price]) AS pricePairs RETURN flex.map.fromPairs(pricePairs) AS priceMap ### [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#example-4-converting-query-results-to-lookup-map) Example 4: Converting Query Results to Lookup Map MATCH (c:Country) WITH collect([c.code, c.name]) AS countryPairs WITH flex.map.fromPairs(countryPairs) AS lookup RETURN lookup['US'] AS usaName, lookup['UK'] AS ukName [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#notes) Notes ---------------------------------------------------------------------- * Returns empty map if input is not an array or is `null` * Each pair must be a two-element array; invalid pairs are skipped * If a key is `null` or `undefined`, the pair is ignored * Duplicate keys result in the last value being used * Keys are converted to strings as map property names [](https://docs.falkordb.com/udfs/flex/map/fromPairs.html#see-also) See Also ---------------------------------------------------------------------------- * [coll.zip](https://docs.falkordb.com/udfs/flex/collections/zip.html) - Create pairs from two lists * [map.submap](https://docs.falkordb.com/udfs/flex/map/submap.html) - Extract subset of keys from a map * * * --- # Cypher coverage | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/cypher-support.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/cypher-support.html#cypher-coverage) Cypher coverage ======================================================================================== This document is based on the Cypher Query Language Reference (version 9), available at [OpenCypher Resources](https://www.opencypher.org/resources) . [](https://docs.falkordb.com/cypher/cypher-support.html#patterns) Patterns -------------------------------------------------------------------------- Patterns are fully supported. [](https://docs.falkordb.com/cypher/cypher-support.html#types) Types -------------------------------------------------------------------- ### [](https://docs.falkordb.com/cypher/cypher-support.html#structural-types) Structural types * Nodes * Relationships * Path variables (alternating sequence of nodes and relationships). ### [](https://docs.falkordb.com/cypher/cypher-support.html#composite-types) Composite types * Lists * Maps * Temporal types (Date, DateTime, LocalDateTime, Time, LocalTime, Duration) ### [](https://docs.falkordb.com/cypher/cypher-support.html#literal-types) Literal types * Numeric types (64-bit doubles and 64-bit signed integer representations) * String literals * Booleans **Unsupported:** * Hexadecimal and octal numerics ### [](https://docs.falkordb.com/cypher/cypher-support.html#other) Other NULL is supported as a representation of a missing or undefined value. [](https://docs.falkordb.com/cypher/cypher-support.html#comparability-equality-orderability-and-equivalence) Comparability, equality, orderability, and equivalence ------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is a somewhat nebulous area in Cypher itself, with a lot of edge cases. Broadly speaking, FalkorDB behaves as expected with string and numeric values. There are likely some behaviors involving the numerics NaN, -inf, inf, and possibly -0.0 that deviate from the Cypher standard. We do not support any of these properties at the type level, meaning nodes and relationships are not internally comparable. [](https://docs.falkordb.com/cypher/cypher-support.html#clauses) Clauses ------------------------------------------------------------------------ ### [](https://docs.falkordb.com/cypher/cypher-support.html#reading-clauses) Reading Clauses * MATCH * OPTIONAL MATCH **Unsupported:** * Label expressions ### [](https://docs.falkordb.com/cypher/cypher-support.html#projecting-clauses) Projecting Clauses * RETURN * AS * WITH * UNWIND ### [](https://docs.falkordb.com/cypher/cypher-support.html#reading-sub-clauses) Reading sub-clauses * WHERE * ORDER BY * SKIP * LIMIT ### [](https://docs.falkordb.com/cypher/cypher-support.html#writing-clauses) Writing Clauses * CREATE * DELETE * We actually implement DETACH DELETE, the distinction being that relationships invalidated by node deletions are automatically deleted. * SET * REMOVE (to modify properties and labels). See [REMOVE](https://docs.falkordb.com/cypher/remove) for details. ### [](https://docs.falkordb.com/cypher/cypher-support.html#readingwriting-clauses) Reading/Writing Clauses * MERGE * CALL (procedures) * The currently-supported procedures are listed in [the Procedures documentation](https://docs.falkordb.com/commands/graph.query#procedures) . ### [](https://docs.falkordb.com/cypher/cypher-support.html#set-operations) Set Operations * UNION * UNION ALL [](https://docs.falkordb.com/cypher/cypher-support.html#functions) Functions ---------------------------------------------------------------------------- The currently-supported functions are listed in [the Functions documentation](https://docs.falkordb.com/commands/graph.query#functions) . **Unsupported:** * Temporal arithmetic functions * User-defined functions [](https://docs.falkordb.com/cypher/cypher-support.html#operators) Operators ---------------------------------------------------------------------------- ### [](https://docs.falkordb.com/cypher/cypher-support.html#mathematical-operators) Mathematical operators The currently-supported functions are listed in [the mathematical operators documentation](https://docs.falkordb.com/commands/graph.query#mathematical-operators) . ### [](https://docs.falkordb.com/cypher/cypher-support.html#string-operators) String operators * String operators (STARTS WITH, ENDS WITH, CONTAINS) are supported. **Unsupported:** * Regex operator ### [](https://docs.falkordb.com/cypher/cypher-support.html#boolean-operators) Boolean operators * AND * OR * NOT * XOR [](https://docs.falkordb.com/cypher/cypher-support.html#parameters) Parameters ------------------------------------------------------------------------------ Parameters may be specified to allow for more flexible query construction: CYPHER name_param = "Niccolò Machiavelli" birth_year_param = 1469 MATCH (p:Person {name: $name_param, birth_year: $birth_year_param}) RETURN p The example above shows the syntax used by `redis-cli` to set parameters, but each FalkorDB client introduces a language-appropriate method for setting parameters, and is described in their documentation. [](https://docs.falkordb.com/cypher/cypher-support.html#non-cypher-queries) Non-Cypher queries ---------------------------------------------------------------------------------------------- * FalkorDB provides the `GRAPH.EXPLAIN` command to print the execution plan of a provided query. * `GRAPH.DELETE` will remove a graph and all Redis keys associated with it. * We do not currently provide support for queries that retrieve schemas, though the LABELS and TYPE scalar functions may be used to get a graph overview. * * * --- # Graph Page (Layout) | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/ui/graph-page.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/ui/graph-page.html#graph-page-layout) Graph Page (Layout) ============================================================================================== The Graph page (`/graph`) is the primary workspace for querying and visualizing data. [](https://docs.falkordb.com/browser/ui/graph-page.html#high-level-layout) High-level layout -------------------------------------------------------------------------------------------- The page is composed of: 1. **Left sidebar** (navigation, theme, graph info/chat toggles) 2. **Top selector bar** * Graph selector (choose the active graph) * Query editor (Monaco-based) with Run button * Query history button + editor maximize button 3. **Main results area** * **Graph** tab (visual canvas) * **Table** tab (tabular results) * **Metadata** tab (Explain/Profile/Metadata) 4. **Right side panel** (can be resized, context-driven) * **Data panel** (inspect/edit selected node/edge) * **Add panel** (create nodes/edges) * **Chat panel** (natural-language querying) [](https://docs.falkordb.com/browser/ui/graph-page.html#right-hand-panel-resize-behavior) Right-hand panel resize behavior -------------------------------------------------------------------------------------------------------------------------- The right panel expands/collapses based on what you’re doing: * Selecting a node/edge typically opens **Data**. * Starting “Add node / Add edge” opens **Add**. * Toggling Chat opens **Chat** and clears selection. [](https://docs.falkordb.com/browser/ui/graph-page.html#graph-info-refresh) Graph info refresh ---------------------------------------------------------------------------------------------- Graph info (labels, relationship types, property keys, memory usage) is periodically refreshed based on the configured refresh interval. * * * --- # Graph Info Panel | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/ui/graph-info-panel.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/ui/graph-info-panel.html#graph-info-panel) Graph Info Panel ================================================================================================ The Graph Info panel provides quick, clickable insights into the selected graph’s structure. [](https://docs.falkordb.com/browser/ui/graph-info-panel.html#what-it-shows) What it shows ------------------------------------------------------------------------------------------ * **Graph name** * **Memory usage** (optional; can be toggled via settings) * **Node count** and **edge count** * **Node labels** * **Edge (relationship) types** * **Property keys** [](https://docs.falkordb.com/browser/ui/graph-info-panel.html#click-to-explore-behavior) Click-to-explore behavior ------------------------------------------------------------------------------------------------------------------ The panel is designed for exploration: * Clicking a **label** runs `MATCH (n:Label) RETURN n`. * Clicking an **edge type** runs `MATCH p=()-[:TYPE]-() RETURN p`. * Clicking a **property key** runs a query that finds nodes/edges where that key exists. It also provides “\*” shortcuts: * **All nodes** (`MATCH (n) RETURN n`) * **All edges** (`MATCH p=()-[]-() RETURN p`) [](https://docs.falkordb.com/browser/ui/graph-info-panel.html#style-customization-entrypoint) Style customization entrypoint ---------------------------------------------------------------------------------------------------------------------------- Next to each label, a palette button opens the **Style Settings** panel for that label. * * * --- # GRAPH.EXPLAIN | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.explain.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.explain.html#graphexplain) GRAPH.EXPLAIN ==================================================================================== Constructs a query execution plan but does not run it. Inspect this execution plan to better understand how your query will get executed. Arguments: `Graph name, Query` Returns: `String representation of a query execution plan` python javascript rust java shell Copy from falkordb import FalkorDB client = FalkorDB() graph = client.select_graph('us_government') query = "MATCH (p:President)-[:BORN]->(h:State {name:'Hawaii'}) RETURN p" result = graph.explain(query) print(result) Copy import { FalkorDB } from 'falkordb'; const client = await FalkorDB.connect(); const graph = client.selectGraph('us_government'); const query = "MATCH (p:President)-[:BORN]->(h:State {name:'Hawaii'}) RETURN p"; const result = await graph.explain(query); console.log(result); Copy let client = FalkorDB::connect_default(); let graph = client.select_graph("us_government"); let query = r#"MATCH (p:President)-[:BORN]->(h:State {name:'Hawaii'}) RETURN p"#; let result = graph.explain(query)?; println!("{}", result); Copy FalkorDB client = new FalkorDB(); Graph graph = client.selectGraph("us_government"); String query = "MATCH (p:President)-[:BORN]->(h:State {name:'Hawaii'}) RETURN p"; String result = graph.explain(query); System.out.println(result); Copy GRAPH.EXPLAIN us_government "MATCH (p:President)-[:BORN]->(h:State {name:'Hawaii'}) RETURN p" * * * --- # GRAPH.DELETE | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.delete.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.delete.html#graphdelete) GRAPH.DELETE ================================================================================= Completely removes a graph and all of its entities (nodes and relationships). [](https://docs.falkordb.com/commands/graph.delete.html#syntax) Syntax ---------------------------------------------------------------------- GRAPH.DELETE graph_name **Arguments:** * `graph_name` - Name of the graph to delete **Returns:** String indicating if the operation succeeded or failed. [](https://docs.falkordb.com/commands/graph.delete.html#examples) Examples -------------------------------------------------------------------------- python javascript rust java shell Copy graph.delete() Copy await graph.delete(); Copy graph.delete()?; Copy graph.delete(); Copy GRAPH.DELETE us_government [](https://docs.falkordb.com/commands/graph.delete.html#deleting-individual-nodes) Deleting Individual Nodes ------------------------------------------------------------------------------------------------------------ **Note:** To delete specific nodes or relationships (not the entire graph), use the Cypher `DELETE` clause with a `MATCH` query: python javascript rust java shell Copy graph.query("MATCH (x:Y {propname: propvalue}) DELETE x") Copy await graph.query("MATCH (x:Y {propname: propvalue}) DELETE x"); Copy graph.query("MATCH (x:Y {propname: propvalue}) DELETE x")?; Copy graph.query("MATCH (x:Y {propname: propvalue}) DELETE x"); Copy GRAPH.QUERY DEMO_GRAPH "MATCH (x:Y {propname: propvalue}) DELETE x" **⚠️ Warning:** When you delete a node using the Cypher `DELETE` clause, all of the node’s incoming and outgoing relationships are also automatically removed. * * * --- # GRAPH.INFO | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.info.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.info.html#graphinfo) GRAPH.INFO =========================================================================== Returns information and statistics about currently running and waiting queries. [](https://docs.falkordb.com/commands/graph.info.html#syntax) Syntax -------------------------------------------------------------------- GRAPH.INFO [RunningQueries | WaitingQueries] If no argument is provided, both running and waiting queries are returned. [](https://docs.falkordb.com/commands/graph.info.html#examples) Examples ------------------------------------------------------------------------ 127.0.0.1:6379> GRAPH.INFO 1) "# Running queries" 2) (empty array) 3) "# Waiting queries" 4) (empty array) 127.0.0.1:6379> GRAPH.INFO RunningQueries 1) "# Running queries" 2) (empty array) 127.0.0.1:6379> GRAPH.INFO WaitingQueries 1) "# Waiting queries" 2) (empty array) * * * --- # GRAPH.COPY | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.copy.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.copy.html#graphcopy) GRAPH.COPY =========================================================================== Usage: `GRAPH.COPY ` The `GRAPH.COPY` command creates a copy of a graph, while the copy is performed the `src` graph is fully accessible. Example: python javascript rust java shell Copy # Graphs list is empty graph_list = db.list() # Create Graph 'A' graph_a = db.select_graph('A') result = graph_a.query('CREATE (:Account {number: 516637})') # Copy Graph 'A' to 'Z' graph_z = graph_a.copy('Z') # Graphs list including 'A' and 'Z' graph_list = db.list() # Query Graph 'Z' result = graph_z.query('MATCH (a:Account) RETURN a.number') Copy import { FalkorDB } from 'falkordb'; const client = await FalkorDB.connect(); // Create Graph 'A' const graphA = client.selectGraph('A'); await graphA.query("CREATE (:Account {number: 516637})"); // Copy Graph 'A' to 'Z' await client.copyGraph('A', 'Z'); // Query Graph 'Z' const graphZ = client.selectGraph('Z'); const result = await graphZ.query("MATCH (a:Account) RETURN a.number"); console.log(result); Copy let client = FalkorDB::connect_default(); let graph_a = client.select_graph("A"); graph_a.query("CREATE (:Account {number: 516637})")?; client.copy_graph("A", "Z")?; let graph_z = client.select_graph("Z"); let result = graph_z.query("MATCH (a:Account) RETURN a.number")?; println!("{:?}", result); Copy FalkorDB client = new FalkorDB(); // Create Graph 'A' Graph graphA = client.selectGraph("A"); graphA.query("CREATE (:Account {number: 516637})"); // Copy Graph 'A' to 'Z' client.copyGraph("A", "Z"); Graph graphZ = client.selectGraph("Z"); // Query Graph 'Z' ResultSet result = graphZ.query("MATCH (a:Account) RETURN a.number"); System.out.println(result); Copy 127.0.0.1:6379> GRAPH.LIST (empty array) 127.0.0.1:6379> GRAPH.QUERY A "CREATE (:Account {number: 516637})" 1) 1) "Labels added: 1" 2) "Nodes created: 1" 3) "Properties set: 1" 4) "Cached execution: 0" 5) "Query internal execution time: 0.588084 milliseconds" 127.0.0.1:6379> GRAPH.COPY A Z "OK" 127.0.0.1:6379> GRAPH.LIST 1) "Z" 2) "telemetry{A}" 3) "A" 127.0.0.1:6379> GRAPH.QUERY Z "MATCH (a:Account) RETURN a.number" 1) 1) "a.number" 2) 1) 1) (integer) 516637 3) 1) "Cached execution: 0" 2) "Query internal execution time: 0.638375 milliseconds" * * * --- # GRAPH.CONFIG-SET | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.config-set.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.config-set.html#graphconfig-set) GRAPH.CONFIG-SET ============================================================================================= Set the value of a FalkorDB configuration parameter. Values set using `GRAPH.CONFIG SET` are not persisted after server restart. FalkorDB configuration parameters are detailed [here](https://docs.falkordb.com/configuration) . Note: As detailed in the link above, not all FalkorDB configuration parameters can be set at run-time. python javascript rust java shell Copy from falkordb import FalkorDB client = FalkorDB() print(client.get_config('TIMEOUT')) client.set_config('TIMEOUT', 10000) print(client.get_config('TIMEOUT')) Copy import { FalkorDB } from 'falkordb'; const client = await FalkorDB.connect(); console.log(await client.getConfig('TIMEOUT')); await client.setConfig('TIMEOUT', 10000); console.log(await client.getConfig('TIMEOUT')); Copy let client = FalkorDB::connect_default(); println!("{:?}", client.get_config("TIMEOUT")?); client.set_config("TIMEOUT", 10000)?; println!("{:?}", client.get_config("TIMEOUT")?); Copy FalkorDB client = new FalkorDB(); System.out.println(client.getConfig("TIMEOUT")); client.setConfig("TIMEOUT", 10000); System.out.println(client.getConfig("TIMEOUT")); Copy graph.config get TIMEOUT graph.config set TIMEOUT 10000 graph.config get TIMEOUT # Output: # 1) "TIMEOUT" # 2) (integer) 0 # OK # 1) "TIMEOUT" # 2) (integer) 10000 python javascript rust java shell Copy try: client.set_config('THREAD_COUNT', 10) except Exception as e: print(e) Copy try { await client.setConfig('THREAD_COUNT', 10); } catch (e) { console.error(e); } Copy if let Err(e) = client.set_config("THREAD_COUNT", 10) { println!("{}", e); } Copy try { client.setConfig("THREAD_COUNT", 10); } catch (Exception e) { System.out.println(e); } Copy graph.config set THREAD_COUNT 10 # Output: # (error) This configuration parameter cannot be set at run-time * * * --- # GRAPH.MEMORY | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.memory.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.memory.html#graphmemory) GRAPH.MEMORY ================================================================================= The `GRAPH.MEMORY` command returns detailed memory consumption statistics for a specific graph in **megabytes (MB)**. It provides insight into how much memory is used by various internal data structures such as nodes, edges, schemas, indices, and matrix representations. This command can be used to monitor memory consumption at the graph level, making it especially useful for debugging, monitoring, performance optimization, and capacity planning in FalkorDB deployments. [](https://docs.falkordb.com/commands/graph.memory.html#syntax) Syntax ---------------------------------------------------------------------- GRAPH.MEMORY USAGE [SAMPLES ] Usage: `GRAPH.MEMORY USAGE [SAMPLES ]` [](https://docs.falkordb.com/commands/graph.memory.html#arguments) Arguments ---------------------------------------------------------------------------- | Argument | Description | | --- | --- | | `` | The name of the graph to inspect (also referred to as ``). | | `SAMPLES ` | _(Optional)_ Number of samples to take when estimating memory usage. A higher number improves accuracy but increases computation time. The samples are averaged to estimate the total size. By default, this option is set to 100 if not specified. | [](https://docs.falkordb.com/commands/graph.memory.html#return) Return ---------------------------------------------------------------------- The command returns an array of key-value pairs, where each pair represents a specific memory metric and its value (in MB), corresponding to different components of the graph: | Metric Name / Field | Type | Description | | --- | --- | --- | | `total_graph_sz_mb` | integer | Total memory consumed by the graph. | | `label_matrices_sz_mb` | integer | Amount of memory used by label matrices (node labels tracking). | | `relation_matrices_sz_mb` | integer | Amount of memory used by relationship type matrices (graph topology tracking). | | `amortized_node_block_sz_mb` | integer | Memory used by nodes (amortized node storage). | | `amortized_node_storage_sz_mb` | integer | Amount of memory used for nodes storage (alternative naming). | | `amortized_node_attributes_by_label_sz_mb` | integer | Memory used by node attributes, split by node label. | | `amortized_unlabeled_nodes_attributes_sz_mb` | integer | Memory used by node attributes with no label. | | `amortized_edge_block_sz_mb` | integer | Memory used by edges (amortized edge storage). | | `amortized_edge_storage_sz_mb` | integer | Amount of memory used for relationships storage (alternative naming). | | `amortized_edge_attributes_by_type_sz_mb` | integer | Memory used by edge attributes, split by relationship type. | | `indices_sz_mb` | integer | Amount of memory consumed by indices (if any). | _Note_: Metrics like `amortized_node_block_sz_mb` and `amortized_node_storage_sz_mb` are alternative names for the same data; both are included for clarity. [](https://docs.falkordb.com/commands/graph.memory.html#examples) Examples -------------------------------------------------------------------------- ### [](https://docs.falkordb.com/commands/graph.memory.html#basic-usage) Basic Usage javascript shell Copy import { FalkorDB } from 'falkordb'; const db = await FalkorDB.connect({ socket: { host: 'localhost', port: 6379 } }); const graph = db.selectGraph('myGraph'); const memoryInfo = await graph.memoryUsage(); console.log(memoryInfo); Copy GRAPH.MEMORY USAGE myGraph ### [](https://docs.falkordb.com/commands/graph.memory.html#with-sampling) With Sampling javascript shell Copy const memoryInfo = await graph.memoryUsage({ samples: 500 }); console.log(memoryInfo); Copy GRAPH.MEMORY USAGE myGraph SAMPLES 500 ### [](https://docs.falkordb.com/commands/graph.memory.html#sample-output) Sample Output 127.0.0.1:6379> GRAPH.MEMORY USAGE flights 1) "total_graph_sz_mb" 2) (integer) 1086 3) "label_matrices_sz_mb" 4) (integer) 96 5) "relation_matrices_sz_mb" 6) (integer) 64 7) "amortized_node_storage_sz_mb" 8) (integer) 120 9) "amortized_edge_storage_sz_mb" 10) (integer) 54 11) "indices_sz_mb" 12) (integer) 752 * * * --- # GRAPH.LIST | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.list.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.list.html#graphlist) GRAPH.LIST =========================================================================== Lists all graph keys in the keyspace. [](https://docs.falkordb.com/commands/graph.list.html#examples) Examples ------------------------------------------------------------------------ python javascript rust java shell Copy from falkordb import FalkorDB db = FalkorDB(host='localhost', port=6379) graphs = db.list_graphs() print(graphs) Copy import { FalkorDB } from 'falkordb'; const db = await FalkorDB.connect({ socket: { host: 'localhost', port: 6379 } }); const graphs = await db.list(); console.log(graphs); Copy use falkordb::{FalkorClientBuilder, FalkorConnectionInfo}; let connection_info: FalkorConnectionInfo = "falkor://127.0.0.1:6379" .try_into() .expect("Invalid connection info"); let client = FalkorClientBuilder::new() .with_connection_info(connection_info) .build() .expect("Failed to build client"); let graphs = client.list_graphs(); println!("{:?}", graphs); Copy import com.falkordb.*; Driver driver = FalkorDB.driver("localhost", 6379); List graphs = driver.listGraphs(); System.out.println(graphs); Copy GRAPH.LIST ### [](https://docs.falkordb.com/commands/graph.list.html#sample-output) Sample Output 127.0.0.1:6379> GRAPH.LIST 2) G 3) resources 4) players * * * --- # GRAPH.SLOWLOG | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.slowlog.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.slowlog.html#graphslowlog) GRAPH.SLOWLOG ==================================================================================== Returns a list containing up to 10 of the slowest queries issued against the given graph ID. Each item in the list has the following structure: 1. A Unix timestamp at which the log entry was processed. 2. The issued command. 3. The issued query. 4. The amount of time needed for its execution, in milliseconds. [](https://docs.falkordb.com/commands/graph.slowlog.html#examples) Examples --------------------------------------------------------------------------- ### [](https://docs.falkordb.com/commands/graph.slowlog.html#get-slowlog) Get slowlog python javascript shell Copy from falkordb import FalkorDB db = FalkorDB(host='localhost', port=6379) graph = db.select_graph('graph_id') slowlog = graph.slowlog() print(slowlog) Copy import { FalkorDB } from 'falkordb'; const db = await FalkorDB.connect({ socket: { host: 'localhost', port: 6379 } }); const graph = db.selectGraph('graph_id'); const slowlog = await graph.slowLog(); console.log(slowlog); Copy GRAPH.SLOWLOG graph_id ### [](https://docs.falkordb.com/commands/graph.slowlog.html#sample-output) Sample Output GRAPH.SLOWLOG graph_id 1) 1) "1581932396" 2) "GRAPH.QUERY" 3) "MATCH (a:Person)-[:FRIEND]->(e) RETURN e.name" 4) "0.831" 2) 1) "1581932396" 2) "GRAPH.QUERY" 3) "MATCH (me:Person)-[:FRIEND]->(:Person)-[:FRIEND]->(fof:Person) RETURN fof.name" 4) "0.288" ### [](https://docs.falkordb.com/commands/graph.slowlog.html#reset-slowlog) Reset slowlog python shell Copy graph.slowlog_reset() Copy GRAPH.SLOWLOG graph_id RESET Once cleared the information is lost forever. * * * --- # GraphRAG Toolkit | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#graphrag-toolkit) GraphRAG Toolkit ================================================================================================= AWS GraphRAG Toolkit is an open-source framework for building knowledge graph applications with Large Language Models (LLMs). FalkorDB is supported as a graph store backend, enabling you to leverage FalkorDB’s high-performance graph database capabilities in your GraphRAG applications. [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#overview) Overview --------------------------------------------------------------------------------- The GraphRAG Toolkit provides tools and patterns for building retrieval-augmented generation (RAG) applications that use knowledge graphs. With FalkorDB as the graph store, you can: * Build and query knowledge graphs efficiently * Use semantic-guided search for intelligent retrieval * Connect to FalkorDB Cloud or local instances * Integrate with LLM-powered applications [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#installation) Installation ----------------------------------------------------------------------------------------- The FalkorDB graph store is contained in a separate contributor package. Install it using: pip install https://github.com/awslabs/graphrag-toolkit/archive/refs/tags/v3.13.3.zip#subdirectory=lexical-graph-contrib/falkordb [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#quick-start) Quick Start --------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#1-register-falkordb-as-a-graph-store) 1\. Register FalkorDB as a Graph Store Before creating a FalkorDB graph store, register the `FalkorDBGraphStoreFactory` with the `GraphStoreFactory`: from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory from graphrag_toolkit_contrib.lexical_graph.storage.graph.falkordb import FalkorDBGraphStoreFactory GraphStoreFactory.register(FalkorDBGraphStoreFactory) ### [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#2-create-a-falkordb-graph-store) 2\. Create a FalkorDB Graph Store You can use the `GraphStoreFactory.for_graph_store()` static factory method to create an instance of a FalkorDB graph store. #### [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#using-falkordb-cloud) Using FalkorDB Cloud To create a [FalkorDB Cloud](https://app.falkordb.cloud/) graph store, supply a connection string that begins with `falkordb://`, followed by your FalkorDB endpoint: from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory from graphrag_toolkit_contrib.lexical_graph.storage.graph.falkordb import FalkorDBGraphStoreFactory falkordb_connection_info = 'falkordb://your-falkordb-endpoint' GraphStoreFactory.register(FalkorDBGraphStoreFactory) with GraphStoreFactory.for_graph_store(falkordb_connection_info) as graph_store: # Your code here pass You may need to pass credentials and SSL configuration: from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory from graphrag_toolkit_contrib.lexical_graph.storage.graph.falkordb import FalkorDBGraphStoreFactory falkordb_connection_info = 'falkordb://' GraphStoreFactory.register(FalkorDBGraphStoreFactory) with GraphStoreFactory.for_graph_store( falkordb_connection_info, username='', password='', ssl=True ) as graph_store: # Your code here pass #### [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#using-local-falkordb) Using Local FalkorDB To create a local FalkorDB graph store, supply a connection string with only `falkordb://`: from graphrag_toolkit.lexical_graph.storage import GraphStoreFactory from graphrag_toolkit_contrib.lexical_graph.storage.graph.falkordb import FalkorDBGraphStoreFactory falkordb_connection_info = 'falkordb://' GraphStoreFactory.register(FalkorDBGraphStoreFactory) with GraphStoreFactory.for_graph_store(falkordb_connection_info) as graph_store: # Your code here pass ### [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#3-start-falkordb-local-setup) 3\. Start FalkorDB (Local Setup) If you’re using a local instance, start FalkorDB with Docker: docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:edge Or sign up for [FalkorDB Cloud](https://app.falkordb.cloud/) for a managed solution. [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#features) Features --------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#semantic-guided-search) Semantic-Guided Search The FalkorDB graph store supports semantic-guided search, enabling intelligent retrieval based on meaning and context rather than just keyword matching. **Note:** The FalkorDB graph store currently does not support traversal-based search. [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#resources) Resources ----------------------------------------------------------------------------------- * 🔗 [AWS GraphRAG Toolkit GitHub Repository](https://github.com/awslabs/graphrag-toolkit) * 📖 [GraphRAG Toolkit Documentation](https://github.com/awslabs/graphrag-toolkit/tree/main/docs) * 📓 [FalkorDB Graph Store Documentation](https://github.com/awslabs/graphrag-toolkit/blob/main/docs/lexical-graph/graph-store-falkor-db.md) * ☁️ [FalkorDB Cloud](https://app.falkordb.cloud/) [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#use-cases) Use Cases ----------------------------------------------------------------------------------- * **Knowledge Graph Construction**: Build structured knowledge graphs from unstructured data * **Semantic Search**: Implement context-aware search using graph-based retrieval * **Question Answering**: Combine LLMs with graph data for accurate responses * **Document Understanding**: Extract and organize information in a knowledge graph [](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html#related-tools) Related Tools ------------------------------------------------------------------------------------------- * [GraphRAG-SDK](https://docs.falkordb.com/genai-tools/graphrag-sdk.html) : FalkorDB’s native GraphRAG solution * [LangChain](https://docs.falkordb.com/genai-tools/langchain.html) : Build AI agents with graph memory * [LlamaIndex](https://docs.falkordb.com/genai-tools/llamaindex.html) : LLM application framework with FalkorDB support * * * --- # GenAI Tools | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/#genai-tools) GenAI Tools ================================================================== FalkorDB provides powerful tools and integrations for building intelligent GenAI applications with graph databases and Large Language Models (LLMs). [](https://docs.falkordb.com/genai-tools/#topics-in-this-section) Topics in This Section ---------------------------------------------------------------------------------------- * [GraphRAG-SDK](https://docs.falkordb.com/genai-tools/graphrag-sdk.html) : Build intelligent GraphRAG applications with FalkorDB and LLMs. * [AG2](https://docs.falkordb.com/genai-tools/ag2.html) : Build multi-agent AI systems with AG2 (formerly AutoGen) and FalkorDB GraphRAG. * [LangChain](https://docs.falkordb.com/genai-tools/langchain.html) : Integration with LangChain for AI agents with memory (Python and JavaScript/TypeScript). * [LangGraph](https://docs.falkordb.com/genai-tools/langgraph.html) : Build stateful, multi-actor agentic applications with LangGraph. * [LlamaIndex](https://docs.falkordb.com/genai-tools/llamaindex.html) : Simplify development of LLM-powered applications with LlamaIndex. * [GraphRAG Toolkit](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html) : AWS GraphRAG Toolkit integration for building knowledge graph applications. * [FalkorDB MCP Server](https://docs.falkordb.com/genai-tools/mcpserver/) : Enable AI assistants like Claude to interact with FalkorDB using the Model Context Protocol. * * * Table of contents ----------------- * [GraphRAG-SDK](https://docs.falkordb.com/genai-tools/graphrag-sdk.html) * [AG2](https://docs.falkordb.com/genai-tools/ag2.html) * [LangChain](https://docs.falkordb.com/genai-tools/langchain.html) * [LangGraph](https://docs.falkordb.com/genai-tools/langgraph.html) * [LlamaIndex](https://docs.falkordb.com/genai-tools/llamaindex.html) * [GraphRAG Toolkit](https://docs.falkordb.com/genai-tools/graphrag-toolkit.html) * [MCP Server](https://docs.falkordb.com/genai-tools/mcpserver/) * * * --- # UI Elements | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/ui/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/ui/#ui-elements) UI Elements ================================================================= This section breaks down FalkorDB Browser’s UI into focused pages so you can quickly learn what each screen/panel does and how to use it. [](https://docs.falkordb.com/browser/ui/#authentication) Authentication ----------------------------------------------------------------------- * [Login Screen](https://docs.falkordb.com/browser/ui/login.html) [](https://docs.falkordb.com/browser/ui/#navigation--global-controls) Navigation & global controls -------------------------------------------------------------------------------------------------- * [Navigation, theme toggle, and header](https://docs.falkordb.com/browser/ui/navigation.html) [](https://docs.falkordb.com/browser/ui/#settings) Settings ----------------------------------------------------------- * [Settings page (Browser settings, admin tools, tokens, tutorial)](https://docs.falkordb.com/browser/ui/settings.html) [](https://docs.falkordb.com/browser/ui/#graph-workspace) Graph workspace ------------------------------------------------------------------------- * [Graph page (overall layout)](https://docs.falkordb.com/browser/ui/graph-page.html) * [Main graph canvas](https://docs.falkordb.com/browser/ui/graph-canvas.html) * [Graph Info panel](https://docs.falkordb.com/browser/ui/graph-info-panel.html) * [Style panel (Customize label styles)](https://docs.falkordb.com/browser/ui/style-panel.html) * [Data / Property panel](https://docs.falkordb.com/browser/ui/data-panel.html) * [Graph toolbar & element actions](https://docs.falkordb.com/browser/ui/toolbar-actions.html) * [Chat panel (natural-language to Cypher)](https://docs.falkordb.com/browser/ui/chat-panel.html) [](https://docs.falkordb.com/browser/ui/#querying--results) Querying & results ------------------------------------------------------------------------------ * [Query editor](https://docs.falkordb.com/browser/ui/query-editor.html) * [Query history](https://docs.falkordb.com/browser/ui/query-history.html) * [Table view](https://docs.falkordb.com/browser/ui/table-view.html) * [Metadata view (Explain/Profile/Metadata)](https://docs.falkordb.com/browser/ui/metadata-view.html) * * * Table of contents ----------------- * [Login Screen](https://docs.falkordb.com/browser/ui/login.html) * [Navigation & Header](https://docs.falkordb.com/browser/ui/navigation.html) * [Settings Page](https://docs.falkordb.com/browser/ui/settings.html) * [Graph Page (Layout)](https://docs.falkordb.com/browser/ui/graph-page.html) * [Main Graph Canvas](https://docs.falkordb.com/browser/ui/graph-canvas.html) * [Graph Info Panel](https://docs.falkordb.com/browser/ui/graph-info-panel.html) * [Style Panel](https://docs.falkordb.com/browser/ui/style-panel.html) * [Data / Property Panel](https://docs.falkordb.com/browser/ui/data-panel.html) * [Query Editor](https://docs.falkordb.com/browser/ui/query-editor.html) * [Query History](https://docs.falkordb.com/browser/ui/query-history.html) * [Table View](https://docs.falkordb.com/browser/ui/table-view.html) * [Metadata View](https://docs.falkordb.com/browser/ui/metadata-view.html) * [Graph Toolbar & Element Actions](https://docs.falkordb.com/browser/ui/toolbar-actions.html) * [Chat Panel](https://docs.falkordb.com/browser/ui/chat-panel.html) * * * --- # Full-text Index | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#full-text-indexing) Full-text indexing ======================================================================================================= FalkorDB leverages the indexing capabilities of [RediSearch](https://redis.io/docs/interact/search-and-query/) to provide full-text indices through procedure calls. [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#creating-a-full-text-index-for-a-node-label) Creating a full-text index for a node label --------------------------------------------------------------------------------------------------------------------------------------------------------- To construct a full-text index on the `title` property of all nodes with label `Movie`, use the syntax: python javascript rust java shell Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', 'title')") Copy await graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', 'title')"); Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', 'title')").execute().await?; Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', 'title')"); Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.createNodeIndex('Movie', 'title')" More properties can be added to this index by adding their names to the above set of arguments, or using this syntax again with the additional names. python javascript rust java shell Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Person', 'firstName', 'lastName')") Copy await graph.query("CALL db.idx.fulltext.createNodeIndex('Person', 'firstName', 'lastName')"); Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Person', 'firstName', 'lastName')").execute().await?; Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Person', 'firstName', 'lastName')"); Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.createNodeIndex('Person', 'firstName', 'lastName')" Index configuration options: 1. Language - Define which language to use for stemming text, which is adding the base form of a word to the index. This allows the query for “going” to also return results for “go” and “gone”, for example. 2. Stopwords - These are words that are usually so common that they do not add much information to search, but take up a lot of space and CPU time in the index. To construct a full-text index on the `title` property using `German` language and using custom stopwords of all nodes with label `Movie`, use the syntax: python javascript rust java shell Copy graph.query("CALL db.idx.fulltext.createNodeIndex({ label: 'Movie', language: 'German', stopwords: ['a', 'ab'] }, 'title')") Copy await graph.query("CALL db.idx.fulltext.createNodeIndex({ label: 'Movie', language: 'German', stopwords: ['a', 'ab'] }, 'title')"); Copy graph.query("CALL db.idx.fulltext.createNodeIndex({ label: 'Movie', language: 'German', stopwords: ['a', 'ab'] }, 'title')").execute().await?; Copy graph.query("CALL db.idx.fulltext.createNodeIndex({ label: 'Movie', language: 'German', stopwords: ['a', 'ab'] }, 'title')"); Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.createNodeIndex({ label: 'Movie', language: 'German', stopwords: ['a', 'ab'] }, 'title')" Additional field configuration options: 1. Weight - The importance of the text in the field 2. Nostem - Skip stemming when indexing text 3. Phonetic - Enable phonetic search on the text To construct a full-text index on the `title` property with phonetic search of all nodes with label `Movie`, use the syntax: python javascript rust java shell Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', {field: 'title', phonetic: 'dm:en'})") Copy await graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', {field: 'title', phonetic: 'dm:en'})"); Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', {field: 'title', phonetic: 'dm:en'})").execute().await?; Copy graph.query("CALL db.idx.fulltext.createNodeIndex('Movie', {field: 'title', phonetic: 'dm:en'})"); Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.createNodeIndex('Movie', {field: 'title', phonetic: 'dm:en'})" [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#query-syntax-and-features) Query Syntax and Features --------------------------------------------------------------------------------------------------------------------- FalkorDB uses [RediSearch query syntax](https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/query_syntax/) which provides powerful search capabilities including fuzzy matching, prefix matching, and tokenization. ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#tokenization) Tokenization When text is indexed, it is automatically tokenized (split into words). By default, text is split on whitespace and punctuation. This allows you to search for individual words within larger text fields. For example, if you index a `title` property containing “The Lord of the Rings”, you can search for any of the individual words like “Lord” or “Rings”. ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#prefix-matching) Prefix Matching Prefix matching allows you to search for words that start with a specific prefix using the `*` wildcard. This is useful for autocomplete functionality or when you want to match word variations. python javascript rust java shell Copy # Find all movies with titles containing words starting with "Jun" result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*') YIELD node RETURN node.title") for record in result: print(record["node.title"]) # This would match "Jungle", "June", "Junior", etc. Copy // Find all movies with titles containing words starting with "Jun" const result = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*') YIELD node RETURN node.title"); for (const record of result.data) { console.log(record["node.title"]); } // This would match "Jungle", "June", "Junior", etc. Copy // Find all movies with titles containing words starting with "Jun" let result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*') YIELD node RETURN node.title").execute().await?; for record in result.data() { println!("{}", record["node.title"]); } // This would match "Jungle", "June", "Junior", etc. Copy // Find all movies with titles containing words starting with "Jun" ResultSet result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*') YIELD node RETURN node.title"); for (Record record : result) { System.out.println(record.get("node.title")); } // This would match "Jungle", "June", "Junior", etc. Copy # Find all movies with titles containing words starting with "Jun" GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Jun*') YIELD node RETURN node.title" # This would match "Jungle", "June", "Junior", etc. **Note:** Prefix matching only works at the end of a word (e.g., `Jun*`). The wildcard must appear at the end of the search term. ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#fuzzy-matching) Fuzzy Matching Fuzzy matching allows you to find words that are similar to your search term, accounting for typos and spelling variations. Use the `%` symbol followed by the Levenshtein distance (number of character changes allowed). python javascript rust java shell Copy # Find movies with titles containing words similar to "Jangle" (allowing 1 character difference) result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jangle%1') YIELD node RETURN node.title") for record in result: print(record["node.title"]) # This would match "Jungle" (1 character different) # Allow up to 2 character differences result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jngle%2') YIELD node RETURN node.title") # This would also match "Jungle" (1 character missing) Copy // Find movies with titles containing words similar to "Jangle" (allowing 1 character difference) const result = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jangle%1') YIELD node RETURN node.title"); for (const record of result.data) { console.log(record["node.title"]); } // This would match "Jungle" (1 character different) // Allow up to 2 character differences const result2 = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jngle%2') YIELD node RETURN node.title"); // This would also match "Jungle" (1 character missing) Copy // Find movies with titles containing words similar to "Jangle" (allowing 1 character difference) let result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jangle%1') YIELD node RETURN node.title").execute().await?; for record in result.data() { println!("{}", record["node.title"]); } // This would match "Jungle" (1 character different) // Allow up to 2 character differences let result2 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jngle%2') YIELD node RETURN node.title").execute().await?; // This would also match "Jungle" (1 character missing) Copy // Find movies with titles containing words similar to "Jangle" (allowing 1 character difference) ResultSet result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jangle%1') YIELD node RETURN node.title"); for (Record record : result) { System.out.println(record.get("node.title")); } // This would match "Jungle" (1 character different) // Allow up to 2 character differences ResultSet result2 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', '%Jngle%2') YIELD node RETURN node.title"); // This would also match "Jungle" (1 character missing) Copy # Find movies with titles containing words similar to "Jangle" (allowing 1 character difference) GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', '%Jangle%1') YIELD node RETURN node.title" # This would match "Jungle" (1 character different) # Allow up to 2 character differences GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', '%Jngle%2') YIELD node RETURN node.title" # This would also match "Jungle" (1 character missing) **Fuzzy matching syntax:** `%term%distance` where: * `term` is the word to match * `distance` is the maximum Levenshtein distance (1-3, default is 1 if not specified) **Note:** Fuzzy matching is computationally more expensive than exact or prefix matching, so use it judiciously on large datasets. ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#combining-query-features) Combining Query Features You can combine multiple search terms using boolean operators: * `AND` (or space): All terms must match * `OR` (`|`): At least one term must match * `NOT` (`-`): Term must not be present python javascript rust java shell Copy # Find movies with "Jungle" AND "Book" in the title result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle Book') YIELD node RETURN node.title") # Find movies with "Jungle" OR "Forest" in the title result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle|Forest') YIELD node RETURN node.title") # Find movies with "Book" but NOT "Jungle" result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book -Jungle') YIELD node RETURN node.title") # Combine prefix and fuzzy matching result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*|%Forst%1') YIELD node RETURN node.title") Copy // Find movies with "Jungle" AND "Book" in the title const result = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle Book') YIELD node RETURN node.title"); // Find movies with "Jungle" OR "Forest" in the title const result2 = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle|Forest') YIELD node RETURN node.title"); // Find movies with "Book" but NOT "Jungle" const result3 = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book -Jungle') YIELD node RETURN node.title"); // Combine prefix and fuzzy matching const result4 = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*|%Forst%1') YIELD node RETURN node.title"); Copy // Find movies with "Jungle" AND "Book" in the title let result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle Book') YIELD node RETURN node.title").execute().await?; // Find movies with "Jungle" OR "Forest" in the title let result2 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle|Forest') YIELD node RETURN node.title").execute().await?; // Find movies with "Book" but NOT "Jungle" let result3 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book -Jungle') YIELD node RETURN node.title").execute().await?; // Combine prefix and fuzzy matching let result4 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*|%Forst%1') YIELD node RETURN node.title").execute().await?; Copy // Find movies with "Jungle" AND "Book" in the title ResultSet result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle Book') YIELD node RETURN node.title"); // Find movies with "Jungle" OR "Forest" in the title ResultSet result2 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jungle|Forest') YIELD node RETURN node.title"); // Find movies with "Book" but NOT "Jungle" ResultSet result3 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book -Jungle') YIELD node RETURN node.title"); // Combine prefix and fuzzy matching ResultSet result4 = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Jun*|%Forst%1') YIELD node RETURN node.title"); Copy # Find movies with "Jungle" AND "Book" in the title GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Jungle Book') YIELD node RETURN node.title" # Find movies with "Jungle" OR "Forest" in the title GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Jungle|Forest') YIELD node RETURN node.title" # Find movies with "Book" but NOT "Jungle" GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Book -Jungle') YIELD node RETURN node.title" # Combine prefix and fuzzy matching: Find "Jun*" OR words similar to "Forst" GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Jun*|%Forst%1') YIELD node RETURN node.title" For more advanced query syntax features, see the [RediSearch query syntax documentation](https://redis.io/docs/latest/develop/ai/search-and-query/advanced-concepts/query_syntax/) . [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#utilizing-a-full-text-index-for-a-node-label) Utilizing a full-text index for a node label ----------------------------------------------------------------------------------------------------------------------------------------------------------- An index can be invoked to match any whole words contained within: python javascript rust java shell Copy result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node.title") for record in result: print(record["node.title"]) # Output: # The Jungle Book # The Book of Life Copy const result = await graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node.title"); for (const record of result.data) { console.log(record["node.title"]); } // Output: // The Jungle Book // The Book of Life Copy let result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node.title").execute().await?; for record in result.data() { println!("{}", record["node.title"]); } // Output: // The Jungle Book // The Book of Life Copy ResultSet result = graph.query("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node.title"); for (Record record : result) { System.out.println(record.get("node.title")); } // Output: // The Jungle Book // The Book of Life Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node.title" 1) 1) "node.title" 2) 1) 1) "The Jungle Book" 2) 1) "The Book of Life" 3) 1) "Query internal execution time: 0.927409 milliseconds" This CALL clause can be interleaved with other Cypher clauses to perform more elaborate manipulations: GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node AS m WHERE m.genre = 'Adventure' RETURN m ORDER BY m.rating" 1) 1) "m" 2) 1) 1) 1) 1) "id" 2) (integer) 1168 2) 1) "labels" 2) 1) "Movie" 3) 1) "properties" 2) 1) 1) "genre" 2) "Adventure" 2) 1) "rating" 2) "7.6" 3) 1) "votes" 2) (integer) 151342 4) 1) "year" 2) (integer) 2016 5) 1) "title" 2) "The Jungle Book" 3) 1) "Query internal execution time: 0.226914 milliseconds" In addition to yielding matching nodes, full-text index scans will return the score of each node. This is the [TF-IDF](https://redis.io/docs/interact/search-and-query/advanced-concepts/scoring/#tfidf-default) score of the node, which is informed by how many times the search terms appear in the node and how closely grouped they are. This can be observed in the example: GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Node', 'hello world') YIELD node, score RETURN score, node.val" 1) 1) "score" 2) "node.val" 2) 1) 1) "2" 2) "hello world" 2) 1) "1" 2) "hello to a different world" 3) 1) "Cached execution: 1" 2) "Query internal execution time: 0.335401 milliseconds" [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#deleting-a-full-text-index-for-a-node-label) Deleting a full-text index for a node label --------------------------------------------------------------------------------------------------------------------------------------------------------- For a node label, the full-text index deletion syntax is: python javascript rust java shell Copy graph.query("CALL db.idx.fulltext.drop('Movie')") Copy await graph.query("CALL db.idx.fulltext.drop('Movie')"); Copy graph.query("CALL db.idx.fulltext.drop('Movie')").execute().await?; Copy graph.query("CALL db.idx.fulltext.drop('Movie')"); Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.drop('Movie')" [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#creating-full-text-indexing-for-relation-labels) Creating Full-Text indexing for Relation Labels ----------------------------------------------------------------------------------------------------------------------------------------------------------------- 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: python javascript rust java shell Copy graph.query("CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)") Copy await graph.query("CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)"); Copy graph.query("CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)").execute().await?; Copy graph.query("CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)"); Copy GRAPH.QUERY DEMO_GRAPH "CREATE FULLTEXT INDEX FOR ()-[m:Manager]-() on (m.name)" [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#querying-with-a-full-text-index) Querying with a Full-Text Index --------------------------------------------------------------------------------------------------------------------------------- To search for specific words within the indexed relations, use: python javascript rust java shell Copy result = graph.query("CALL db.idx.fulltext.queryRelationships('Manager', 'Charlie Munger') YIELD relationship RETURN relationship.name") Copy const result = await graph.query("CALL db.idx.fulltext.queryRelationships('Manager', 'Charlie Munger') YIELD relationship RETURN relationship.name"); Copy let result = graph.query("CALL db.idx.fulltext.queryRelationships('Manager', 'Charlie Munger') YIELD relationship RETURN relationship.name").execute().await?; Copy ResultSet result = graph.query("CALL db.idx.fulltext.queryRelationships('Manager', 'Charlie Munger') YIELD relationship RETURN relationship.name"); Copy GRAPH.QUERY DEMO_GRAPH "CALL db.idx.fulltext.queryRelationships('Manager', 'Charlie Munger') YIELD relationship RETURN relationship.name" [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#deleting-a-full-text-index) Deleting a Full-Text Index ----------------------------------------------------------------------------------------------------------------------- To delete the full-text index for a specific relation label, use: python javascript rust java shell Copy graph.query("DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)") Copy await graph.query("DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)"); Copy graph.query("DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)").execute().await?; Copy graph.query("DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)"); Copy GRAPH.QUERY DEMO_GRAPH "DROP FULLTEXT INDEX FOR ()-[m:Manager]-() ON (m.name)" [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#index-management) Index Management --------------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#listing-full-text-indexes) Listing Full-text Indexes To view all indexes (including full-text) in your graph, use: CALL db.indexes() This returns information about all indexes, with full-text indexes marked with type `FULLTEXT`. [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#performance-tradeoffs-and-best-practices) Performance Tradeoffs and Best Practices --------------------------------------------------------------------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#when-to-use-full-text-indexes) When to Use Full-text Indexes Full-text indexes are ideal for: * **Text-heavy search**: Searching within large text fields like descriptions, articles, or comments * **Partial word matching**: When users might not know the exact text * **Fuzzy search**: Handling typos and spelling variations * **Multi-word queries**: Searching for multiple terms with boolean logic ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#when-not-to-use-full-text-indexes) When NOT to Use Full-text Indexes Full-text indexes are not optimal for: * **Exact numeric filtering**: Use range indexes instead for numeric comparisons * **Exact-match queries**: Range indexes are more efficient for exact property matches * **Small or structured data**: For short, well-defined strings, range indexes may be sufficient ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#performance-considerations) Performance Considerations **Benefits:** * Enables sophisticated text search capabilities (fuzzy, prefix, phonetic) * Supports stemming and language-specific optimizations * Returns relevance scores (TF-IDF) for ranking results **Costs:** * **Write overhead**: Text must be tokenized and indexed on write * **Storage**: Requires more space than range indexes due to tokenization and inverted indices * **Configuration complexity**: Language, stopwords, and stemming settings affect results * **Query performance**: Fuzzy matching is more expensive than exact matching **Recommendations:** * Choose the correct language setting for proper stemming * Configure appropriate stopwords for your use case * Use prefix matching (`*`) for autocomplete rather than full fuzzy search when possible * Test query performance with realistic data volumes * Consider the tradeoff between index configurability and query performance ### [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#configuration-best-practices) Configuration Best Practices **Language Selection:** * Wrong language settings can produce poor stemming results * Example: Searching “running” with English stemming finds “run”, but German stemming won’t **Stopwords:** * Default stopwords are optimized for general text * Customize stopwords for domain-specific applications (e.g., legal, medical, technical documents) * Too many stopwords can hurt precision; too few increase index size **Phonetic Search:** * Useful for name searches and when spelling variations are common * Increases index size and query time * Double Metaphone (`dm:en`) is recommended for English [](https://docs.falkordb.com/cypher/indexing/fulltext-index.html#verifying-full-text-index-usage) Verifying Full-text Index Usage --------------------------------------------------------------------------------------------------------------------------------- Use `GRAPH.EXPLAIN` to verify that full-text queries use the index: python javascript rust java shell Copy # Check if full-text index is used result = graph.explain("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node") print(result) # Output shows: ProcedureCall | db.idx.fulltext.queryNodes Copy // Check if full-text index is used const result = await graph.explain("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node"); console.log(result); // Output shows: ProcedureCall | db.idx.fulltext.queryNodes Copy // Check if full-text index is used let result = graph.explain("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node").execute().await?; println!("{}", result); // Output shows: ProcedureCall | db.idx.fulltext.queryNodes Copy // Check if full-text index is used String result = graph.explain("CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node"); System.out.println(result); // Output shows: ProcedureCall | db.idx.fulltext.queryNodes Copy # Check if full-text index is used GRAPH.EXPLAIN DEMO_GRAPH "CALL db.idx.fulltext.queryNodes('Movie', 'Book') YIELD node RETURN node" # Output shows: ProcedureCall | db.idx.fulltext.queryNodes * * * --- # MCP Server | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/mcpserver/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/mcpserver/#mcp-server) MCP Server ========================================================================== Enable AI assistants to query and interact with FalkorDB graph databases A Model Context Protocol (MCP) server that allows AI models like Claude to interact with FalkorDB using natural language. Query your graph data, create relationships, and manage your knowledge graph through conversational AI. * Query graph databases using OpenCypher (with read-only mode support) * Create and manage nodes and relationships * List and explore multiple graphs * Delete graphs when needed * Support for replica instances with read-only queries [](https://docs.falkordb.com/genai-tools/mcpserver/#what-is-the-model-context-protocol) What is the Model Context Protocol? --------------------------------------------------------------------------------------------------------------------------- The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open protocol that standardizes how AI applications provide context to Large Language Models (LLMs). It enables AI assistants to securely connect to external data sources and tools, making them more powerful and context-aware. [](https://docs.falkordb.com/genai-tools/mcpserver/#topics-in-this-section) Topics in This Section -------------------------------------------------------------------------------------------------- * [Quick Start](https://docs.falkordb.com/genai-tools/mcpserver/quickstart.html) : Install and connect the MCP server to Claude Desktop in minutes. * [Configuration](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html) : Environment variables, transport modes, and multi-instance setup. * [Docker Deployment](https://docs.falkordb.com/genai-tools/mcpserver/docker.html) : Run the MCP server using Docker Hub images. [](https://docs.falkordb.com/genai-tools/mcpserver/#resources) Resources ------------------------------------------------------------------------ * 📦 [npm Package](https://www.npmjs.com/package/@falkordb/mcpserver) * 💻 [GitHub Repository](https://github.com/FalkorDB/FalkorDB-MCPServer) * 🐳 [Docker Hub](https://hub.docker.com/r/falkordb/mcpserver) * 📖 [MCP Specification](https://modelcontextprotocol.io/docs) * 📚 [FalkorDB Documentation](https://docs.falkordb.com/) * 🔍 [OpenCypher Query Language](https://opencypher.org/) * * * Table of contents ----------------- * [Quick Start](https://docs.falkordb.com/genai-tools/mcpserver/quickstart.html) * [Configuration](https://docs.falkordb.com/genai-tools/mcpserver/configuration.html) * [Docker Deployment](https://docs.falkordb.com/genai-tools/mcpserver/docker.html) * * * --- # Functions | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cypher/functions.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/cypher/functions.html#functions) Functions ======================================================================= This section contains information on all supported functions from the Cypher query language. * [Predicate functions](https://docs.falkordb.com/cypher/functions.html#predicate-functions) * [Scalar functions](https://docs.falkordb.com/cypher/functions.html#scalar-functions) * [Aggregating functions](https://docs.falkordb.com/cypher/functions.html#aggregating-functions) * [List functions](https://docs.falkordb.com/cypher/functions.html#list-functions) * [Mathematical operators](https://docs.falkordb.com/cypher/functions.html#mathematical-operators) * [Mathematical functions](https://docs.falkordb.com/cypher/functions.html#mathematical-functions) * [Trigonometric functions](https://docs.falkordb.com/cypher/functions.html#trigonometric-functions) * [String functions](https://docs.falkordb.com/cypher/functions.html#string-functions) * [Point functions](https://docs.falkordb.com/cypher/functions.html#point-functions) * [Type conversion functions](https://docs.falkordb.com/cypher/functions.html#type-conversion-functions) * [Node functions](https://docs.falkordb.com/cypher/functions.html#node-functions) * [Path functions](https://docs.falkordb.com/cypher/functions.html#path-functions) * [Vector functions](https://docs.falkordb.com/cypher/functions.html#vector-functions) [](https://docs.falkordb.com/cypher/functions.html#predicate-functions) Predicate functions ------------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | [all(_var_ IN _list_ WHERE _predicate_)](https://docs.falkordb.com/cypher/functions.html#existential-comprehension-functions) | Returns true when _predicate_ holds true for all elements in _list_ | | [any(_var_ IN _list_ WHERE _predicate_)](https://docs.falkordb.com/cypher/functions.html#existential-comprehension-functions) | Returns true when _predicate_ holds true for at least one element in _list_ | | exists(_pattern_) | Returns true when at least one match for _pattern_ exists | | isEmpty(_list_\|_map_\|_string_) | Returns true if the input list or map contains no elements or if the input string contains no characters
Returns null when the input evaluates to null | | [none(_var_ IN _list_ WHERE _predicate_)](https://docs.falkordb.com/cypher/functions.html#existential-comprehension-functions) | Returns true when _predicate_ holds false for all elements in _list_ | | [single(_var_ IN _list_ WHERE _predicate_)](https://docs.falkordb.com/cypher/functions.html#existential-comprehension-functions) | Returns true when _predicate_ holds true for exactly one element in _list_ | [](https://docs.falkordb.com/cypher/functions.html#scalar-functions) Scalar functions ------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | coalesce(_expr_\[, expr…\]) | Returns the evaluation of the first argument that evaluates to a non-null value
Returns null when all arguments evaluate to null | | endNode(_relationship_) | Returns the destination node of a relationship
Returns null when _relationship_ evaluates to null | | hasLabels(_node_, _labelsList_) \* | Returns true when _node_ contains all labels in _labelsList_, otherwise false
Return true when _labelsList_ evaluates to an empty list | | id(_node_\|_relationship_) | Returns the internal ID of a node or relationship (which is not immutable) | | labels(_node_) | Returns a list of strings: all labels of _node_
Returns null when _node_ evaluates to null | | properties(_expr_) | When _expr_ is a node or relationship: Returns a map containing all the properties of the given node or relationship
When _expr_ evaluates to a map: Returns _expr_ unchanged
Returns null when _expr_ evaluates to null | | randomUUID() | Returns a random UUID (Universal Unique IDentifier) | | startNode(_relationship_) | Returns the source node of a relationship
Returns null when _relationship_ evaluates to null | | timestamp() | Returns the current system timestamp (milliseconds since epoch) | | type(_relationship_) | Returns a string: the type of _relationship_
Returns null when _relationship_ evaluates to null | | typeOf(_expr_) \* | Returns a string: the type of a literal, an expression’s evaluation, an alias, a node’s property, or a relationship’s property
Return value is one of `Map`, `String`, `Integer`, `Boolean`, `Float`, `Node`, `Edge`, `List`, `Path`, `Point`, or `Null` | | prev(_expr_) \* | Stores the previous value and returns it on the next call; returns `null` on the first call. Useful for variable-length traversal filtering of edges based on the prior value. | \* FalkorDB-specific extensions to Cypher [](https://docs.falkordb.com/cypher/functions.html#aggregating-functions) Aggregating functions ----------------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | avg(_expr_) | Returns the average of a set of numeric values. null values are ignored
Returns null when _expr_ has no evaluations | | collect(_expr_) | Returns a list containing all non-null elements which evaluated from a given expression | | count(_expr_\|\*) | When argument is _expr_: returns the number of non-null evaluations of _expr_
When argument is `*`: returns the total number of evaluations (including nulls) | | max(_expr_) | Returns the maximum value in a set of values (taking into account type ordering). null values are ignored
Returns null when _expr_ has no evaluations | | min(_expr_) | Returns the minimum value in a set of values (taking into account type ordering). null values are ignored
Returns null when _expr_ has no evaluations | | percentileCont(_expr_, _percentile_) | Returns a linear-interpolated percentile (between 0.0 and 1.0) over a set of numeric values. null values are ignored
Returns null when _expr_ has no evaluations | | percentileDisc(_expr_, _percentile_) | Returns a nearest-value percentile (between 0.0 and 1.0) over a set of numeric values. null values are ignored
Returns null when _expr_ has no evaluations | | stDev(_expr_) | Returns the sample standard deviation over a set of numeric values. null values are ignored
Returns null when _expr_ has no evaluations | | stDevP(_expr_) | Returns the population standard deviation over a set of numeric values. null values are ignored
Returns null when _expr_ has no evaluations | | sum(_expr_) | Returns the sum of a set of numeric values. null values are ignored
Returns 0 when _expr_ has no evaluations | [](https://docs.falkordb.com/cypher/functions.html#list-functions) List functions --------------------------------------------------------------------------------- | Function | Description | | --- | --- | | head(_expr_) | Returns the first element of a list
Returns null when _expr_ evaluates to null or an empty list | | keys(_expr_) | Returns a list of strings: all key names for given map or all property names for a given node or edge
Returns null when _expr_ evaluates to null | | last(_expr_) | Returns the last element of a list
Returns null when _expr_ evaluates to null or an empty list | | list.dedup(_list_) \* | Given a list, returns a similar list after removing duplicate elements
Order is preserved, duplicates are removed from the end of the list
Returns null when _list_ evaluates to null
Emit an error when _list_ does not evaluate to a list or to null | | list.insert(_list_, _idx_, _val_\[, _dups_ = TRUE\]) \* | Given a list, returns a list after inserting a given value at a given index
_idx_ is 0-based when non-negative, or from the end of the list when negative
Returns null when _list_ evaluates to null
Returns _list_ when _val_ evaluates to null
Returns _list_ when _idx_ evaluates to an integer not in \[-NumItems-1 .. NumItems\]
When _dups_ evaluates to FALSE: returns _list_ when _val_ evaluates to a value that is already an element of _list_
Emit an error when _list_ does not evaluate to a list or to null
Emit an error when _idx_ does not evaluate to an integer
Emit an error when _dups_, if specified, does not evaluate to a Boolean | | list.insertListElements(_list_, _list2_, _idx_\[, _dups_ = TRUE\]) \* | Given a list, returns a list after inserting the elements of a second list at a given index
_idx_ is 0-based when non-negative, or from the end of the list when negative
Returns null when _list_ evaluates to null
Returns _list_ when _list2_ evaluates to null
Returns _list_ when _idx_ evaluates to an integer not in \[-NumItems-1 .. NumItems\]
When _dups_ evaluates to FALSE: If an element of _list2_ evaluates to an element of _list_ it would be skipped; If multiple elements of _list2_ evaluate to the same value - this value would be inserted at most once to _list_
Emit an error when _list_ does not evaluate to a list or to null
Emit an error when _list2_ does not evaluate to a list or to null
Emit an error when _idx_ does not evaluate to an integer
Emit an error when _dups_, if specified, does not evaluate to a Boolean | | list.remove(_list_, _idx_\[, _count_ = 1\]) \* | Given a list, returns a list after removing a given number of consecutive elements (or less, if the end of the list has been reached). starting at a given index.
_idx_ is 0-based when non-negative, or from the end of the list when negative
Returns _null_ when _list_ evaluates to null
Returns _list_ when _idx_ evaluates to an integer not in \[-NumItems .. NumItems-1\]
Returns _list_ when _count_ evaluates to a non-positive integer
Emit an error when _list_ does not evaluate to a list or to null
Emit an error when _idx_ does not evaluate to an integer
Emit an error when _count_, if specified, does not evaluate to an integer | | list.sort(_list_\[, _ascending_ = TRUE\]) \* | Given a list, returns a list with similar elements, but sorted (inversely-sorted if _ascending_ is evaluated to FALSE)
Returns null when _list_ evaluates to null
Emit an error when _list_ does not evaluate to a list or to null
Emit an error when _ascending_, if specified, does not evaluate to a Boolean | | range(_first_, _last_\[, _step_ = 1\]) | Returns a list of integers in the range of \[start, end\]. _step_, an optional integer argument, is the increment between consecutive elements | | size(_expr_) | Returns the number of elements in a list
Returns null with _expr_ evaluates to null | | tail(_expr_) | Returns a sublist of a list, which contains all its elements except the first
Returns an empty list when _expr_ contains less than 2 elements.
Returns null when _expr_ evaluates to null | | [reduce(…)](https://docs.falkordb.com/cypher/functions.html#reduce) | Returns a scalar produced by evaluating an expression against each list member | \* FalkorDB-specific extensions to Cypher [](https://docs.falkordb.com/cypher/functions.html#mathematical-operators) Mathematical operators ------------------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | + | Add two values | | \- | Subtract second value from first | | \* | Multiply two values | | / | Divide first value by the second | | ^ | Raise the first value to the power of the second | | % | Perform modulo division of the first value by the second | [](https://docs.falkordb.com/cypher/functions.html#mathematical-functions) Mathematical functions ------------------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | abs(_expr_) | Returns the absolute value of a numeric value
Returns null when _expr_ evaluates to null | | ceil(_expr_) \*\* | When _expr_ evaluates to an integer: returns its evaluation
When _expr_ evaluates to floating point: returns a floating point equals to the smallest integer greater than or equal to _expr_
Returns null when _expr_ evaluates to null | | e() | Returns the constant _e_, the base of the natural logarithm | | exp(_expr_) | Returns _e_^_expr_, where _e_ is the base of the natural logarithm
Returns null when _expr_ evaluates to null | | floor(_expr_) \*\* | When _expr_ evaluates to an integer: returns its evaluation
When _expr_ evaluates to a floating point: returns a floating point equals to the greatest integer less than or equal to _expr_
Returns null when _expr_ evaluates to null | | log(_expr_) | Returns the natural logarithm of a numeric value
Returns nan when _expr_ evaluates to a negative numeric value, -inf when _expr_ evaluates to 0, and null when _expr_ evaluates to null | | log10(_expr_) | Returns the base-10 logarithm of a numeric value
Returns nan when _expr_ evaluates to a negative numeric value, -inf when _expr_ evaluates to 0, and null when _expr_ evaluates to null | | pow(_base_, _exponent_) \* | Returns _base_ raised to the power of _exponent_ (equivalent to _base_^_exponent_)
Returns null when either evaluates to null | | rand() | Returns a random floating point in the range \[0,1\] | | round(_expr_) \*\* \*\*\* | When _expr_ evaluates to an integer: returns its evaluation
When _expr_ evaluates to a floating point: returns a floating point equals to the integer closest to _expr_
Returns null when _expr_ evaluates to null | | sign(_expr_) | Returns the signum of a numeric value: 0 when _expr_ evaluates to 0, -1 when _expr_ evaluates to a negative numeric value, and 1 when _expr_ evaluates to a positive numeric value
Returns null when _expr_ evaluates to null | | sqrt(_expr_) | Returns the square root of a numeric value
Returns nan when _expr_ evaluates to a negative value and null when _expr_ evaluates to null | \* FalkorDB-specific extensions to Cypher \*\* FalkorDB-specific behavior: to avoid possible loss of precision, when _expr_ evaluates to an integer - the result is an integer as well \*\*\* FalkorDB-specific behavior: tie-breaking method is “half away from zero” [](https://docs.falkordb.com/cypher/functions.html#trigonometric-functions) Trigonometric functions --------------------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | acos(_expr_) | Returns the arccosine, in radians, of a numeric value
Returns nan when _expr_ evaluates to a numeric value not in \[-1, 1\] and null when _expr_ evaluates to null | | asin(_expr_) | Returns the arcsine, in radians, of a numeric value
Returns nan when _expr_ evaluates to a numeric value not in \[-1, 1\] and null when _expr_ evaluates to null | | atan(_expr_) | Returns the arctangent, in radians, of a numeric value
Returns null when _expr_ evaluates to null | | atan2(_expr_, _expr_) | Returns the 2-argument arctangent, in radians, of a pair of numeric values (Cartesian coordinates)
Returns 0 when both expressions evaluate to 0
Returns null when either expression evaluates to null | | cos(_expr_) | Returns the cosine of a numeric value that represents an angle in radians
Returns null when _expr_ evaluates to null | | cot(_expr_) | Returns the cotangent of a numeric value that represents an angle in radians
Returns inf when _expr_ evaluates to 0 and null when _expr_ evaluates to null | | degrees(_expr_) | Converts a numeric value from radians to degrees
Returns null when _expr_ evaluates to null | | haversin(_expr_) | Returns half the versine of a numeric value that represents an angle in radians
Returns null when _expr_ evaluates to null | | pi() | Returns the mathematical constant _pi_ | | radians(_expr_) | Converts a numeric value from degrees to radians
Returns null when _expr_ evaluates to null | | sin(_expr_) | Returns the sine of a numeric value that represents an angle in radians
Returns null when _expr_ evaluates to null | | tan(_expr_) | Returns the tangent of a numeric value that represents an angle in radians
Returns null when _expr_ evaluates to null | [](https://docs.falkordb.com/cypher/functions.html#string-functions) String functions ------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | left(_str_, _len_) | Returns a string containing the _len_ leftmost characters of _str_
Returns null when _str_ evaluates to null, otherwise emit an error if _len_ evaluates to null | | lTrim(_str_) | Returns _str_ with leading whitespace removed
Returns null when _str_ evaluates to null | | replace(_str_, _search_, _replace_) | Returns _str_ with all occurrences of _search_ replaced with _replace_
Returns null when any argument evaluates to null | | reverse(_str_) | Returns a string in which the order of all characters in _str_ are reversed
Returns null when _str_ evaluates to null | | right(_str_, _len_) | Returns a string containing the _len_ rightmost characters of _str_
Returns null when _str_ evaluates to null, otherwise emit an error if _len_ evaluates to null | | rTrim(_str_) | Returns _str_ with trailing whitespace removed
Returns null when _str_ evaluates to null | | split(_str_, _delimiter_) | Returns a list of strings from splitting _str_ by _delimiter_
Returns null when any argument evaluates to null | | string.join(_strList_\[, _delimiter_ = ‘’\]) \* | Returns a concatenation of a list of strings using a given delimiter
Returns null when _strList_ evaluates to null
Returns null when _delimiter_, if specified, evaluates to null
Emit an error when _strList_ does not evaluate to a list or to null
Emit an error when an element of _strList_ does not evaluate to a string
Emit an error when _delimiter_, if specified, does not evaluate to a string or to null | | string.matchRegEx(_str_, _regex_) \* | Given a string and a regular expression, returns a list of all matches and matching regions
Returns an empty list when _str_ evaluates to null
Returns an empty list when _regex_ evaluates to null
Emit an error when _str_ does not evaluate to a string or to null
Emit an error when _regex_ does not evaluate to a valid regex string or to null | | string.replaceRegEx(_str_, _regex_, _replacement_) \* | Given a string and a regular expression, returns a string after replacing each regex match with a given replacement
Returns null when _str_ evaluates to null
Returns null when _regex_ evaluates to null
Returns null when _replacement_ evaluates to null
Emit an error when _str_ does not evaluate to a string or to null
Emit an error when _regex_ does not evaluate to a valid regex string or to null
Emit an error when _replacement_ does not evaluate to a string or to null | | substring(_str_, _start_\[, _len_\]) | When _len_ is specified: returns a substring of _str_ beginning with a 0-based index _start_ and with length _len_
When _len_ is not specified: returns a substring of _str_ beginning with a 0-based index _start_ and extending to the end of _str_
Returns null when _str_ evaluates to null
Emit an error when _start_ or _len_ evaluate to null | | toLower(_str_) | Returns _str_ in lowercase
Returns null when _str_ evaluates to null | | toJSON(_expr_) \* | Returns a [JSON representation](https://docs.falkordb.com/cypher/functions.html#json-format)
of a value
Returns null when _expr_ evaluates to null | | toUpper(_str_) | Returns _str_ in uppercase
Returns null when _str_ evaluates to null | | trim(_str_) | Returns _str_ with leading and trailing whitespace removed
Returns null when _str_ evaluates to null | | size(_str_) | Returns the number of characters in _str_
Returns null when _str_ evaluates to null | | [intern(_str_)](https://docs.falkordb.com/cypher/functions.html#intern) | Returns a deduplicated, memory-efficient representation of _str_
Returns null when _str_ evaluates to null | [](https://docs.falkordb.com/cypher/functions.html#point-functions) Point functions ----------------------------------------------------------------------------------- | Function | Description | | --- | --- | | [point(_map_)](https://docs.falkordb.com/cypher/functions.html#point) | Returns a Point representing a lat/lon coordinates | | distance(_point1_, _point2_) | Returns the distance in meters between the two given points
Returns null when either evaluates to null | [](https://docs.falkordb.com/cypher/functions.html#type-conversion-functions) Type conversion functions ------------------------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | toBoolean(_expr_) | Returns a Boolean when _expr_ evaluates to a Boolean
Converts a string to Boolean (`"true"` (case insensitive) to true, `"false"` (case insensitive) to false, any other value to null)
Converts an integer to Boolean (0 to `false`, any other values to `true`)
Returns null when _expr_ evaluates to null
Emit an error on other types | | toBooleanList(_exprList_) | Converts a list to a list of Booleans. Each element in the list is converted using toBooleanOrNull() | | toBooleanOrNull(_expr_) | Returns a Boolean when _expr_ evaluates to a Boolean
Converts a string to Boolean (`"true"` (case insensitive) to true, `"false"` (case insensitive) to false, any other value to null)
Converts an integer to Boolean (0 to `false`, any other values to `true`)
Returns null when _expr_ evaluates to null
Returns null for other types | | toFloat(_expr_) | Returns a floating point when _expr_ evaluates to a floating point
Converts an integer to a floating point
Converts a string to a floating point or null
Returns null when _expr_ evaluates to null
Emit an error on other types | | toFloatList(_exprList_) | Converts a list to a list of floating points. Each element in the list is converted using toFloatOrNull() | | toFloatOrNull(_expr_) | Returns a floating point when _expr_ evaluates to a floating point
Converts an integer to a floating point
Converts a string to a floating point or null
Returns null when _expr_ evaluates to null
Returns null for other types | | toInteger(_expr_) \* | Returns an integer when _expr_ evaluates to an integer
Converts a floating point to integer
Converts a string to an integer or null
Converts a Boolean to an integer (false to 0, true to 1) Returns null when _expr_ evaluates to null
Emit an error on other types | | toIntegerList(_exprList_) \* | Converts a list to a list of integer values. Each element in the list is converted using toIntegerOrNull() | | toIntegerOrNull(_expr_) \* | Returns an integer when _expr_ evaluates to an integer
Converts a floating point to integer
Converts a string to an integer or null
Converts a Boolean to an integer (false to 0, true to 1) Returns null when _expr_ evaluates to null
Returns null for other types | | toString(_expr_) | Returns a string when _expr_ evaluates to a string
Converts an integer, float, Boolean, string, or point to a string representation
Returns null when _expr_ evaluates to null
Emit an error on other types | | toStringList(_exprList_) | Converts a list to a list of strings. Each element in the list is converted using toStringOrNull() | | toStringOrNull(_expr_) | Returns a string when _expr_ evaluates to a string
Converts an integer, float, Boolean, string, or point to a string representation
Returns null when _expr_ evaluates to null
Returns null for other types | \* FalkorDB-specific behavior: rounding method when converting a floating point to an integer is “toward negative infinity (floor)” [](https://docs.falkordb.com/cypher/functions.html#node-functions) Node functions --------------------------------------------------------------------------------- | Function | Description | | --- | --- | | indegree(_node_ \[, _reltype_ …\]) \*
indegree(_node_ \[, _reltypeList_\]) \* | When no relationship types are specified: Returns the number of _node_’s incoming edges
When one or more relationship types are specified: Returns the number of _node’s_ incoming edges with one of the given relationship types
Return null when _node_ evaluates to null | | outdegree(_node_ \[, _reltype_ …\]) \*
outdegree(_node_ \[, _reltypeList_\]) \* | When no relationship types are specified: Returns the number of _node_’s outgoing edges
When one or more relationship types are specified: Returns the number of _node’s_ outgoing edges with one of the given relationship types
Return null when _node_ evaluates to null | \* FalkorDB-specific extensions to Cypher [](https://docs.falkordb.com/cypher/functions.html#path-functions) Path functions --------------------------------------------------------------------------------- | Function | Description | | --- | --- | | nodes(_path_) | Returns a list containing all the nodes in _path_
Returns null if _path_ evaluates to null | | relationships(_path_) | Returns a list containing all the relationships in _path_
Returns null if _path_ evaluates to null | | length(_path_) | Return the length (number of edges) of _path_
Returns null if _path_ evaluates to null | | [shortestPath(…)](https://docs.falkordb.com/cypher/functions.html#about-path-functions)
\* | Return the shortest path that resolves the given pattern | | [allShortestPaths(…)](https://docs.falkordb.com/cypher/functions.html#about-path-functions)
\* | Returns all the shortest paths between a pair of entities | \* FalkorDB-specific extensions to Cypher [](https://docs.falkordb.com/cypher/functions.html#vector-functions) Vector functions ------------------------------------------------------------------------------------- | Function | Description | | --- | --- | | vecf32(_array_) | Creates a new float 32 vector
all elements of input array must be of type float | | vec.euclideanDistance(_vector_, _vector_) | Returns the Euclidean distance between the two input vectors | | vec.cosineDistance(_vector_, _vector_) | Returns the Cosine distance between the two input vectors | ### [](https://docs.falkordb.com/cypher/functions.html#list-comprehensions) List comprehensions List comprehensions are a syntactical construct that accepts an array and produces another based on the provided map and filter directives. They are a common construct in functional languages and modern high-level languages. In Cypher, they use the syntax: [element IN array WHERE condition | output elem] * `array` can be any expression that produces an array: a literal, a property reference, or a function call. * `WHERE condition` is an optional argument to only project elements that pass a certain criteria. If omitted, all elements in the array will be represented in the output. * `| output elem` is an optional argument that allows elements to be transformed in the output array. If omitted, the output elements will be the same as their corresponding inputs. The following query collects all paths of any length, then for each produces an array containing the `name` property of every node with a `rank` property greater than 10: MATCH p=()-[*]->() RETURN [node IN nodes(p) WHERE node.rank > 10 | node.name] #### [](https://docs.falkordb.com/cypher/functions.html#existential-comprehension-functions) Existential comprehension functions The functions `any()`, `all()`, `single()` and `none()` use a simplified form of the list comprehension syntax and return a boolean value. any(element IN array WHERE condition) They can operate on any form of input array, but are particularly useful for path filtering. The following query collects all paths of any length in which all traversed edges have a weight less than 3: MATCH p=()-[*]->() WHERE all(edge IN relationships(p) WHERE edge.weight < 3) RETURN p ### [](https://docs.falkordb.com/cypher/functions.html#pattern-comprehensions) Pattern comprehensions Pattern comprehensions are a method of producing a list composed of values found by performing the traversal of a given graph pattern. The following query returns the name of a `Person` node and a list of all their friends’ ages: MATCH (n:Person) RETURN n.name, [(n)-[:FRIEND_OF]->(f:Person) | f.age] Optionally, a `WHERE` clause may be embedded in the pattern comprehension to filter results. In this query, all friends’ ages will be gathered for friendships that started before 2010: MATCH (n:Person) RETURN n.name, [(n)-[e:FRIEND_OF]->(f:Person) WHERE e.since < 2010 | f.age] ### [](https://docs.falkordb.com/cypher/functions.html#case-when) CASE WHEN The case statement comes in two variants. Both accept an input argument and evaluates it against one or more expressions. The first `WHEN` argument that specifies a value matching the result will be accepted, and the value specified by the corresponding `THEN` keyword will be returned. Optionally, an `ELSE` argument may also be specified to indicate what to do if none of the `WHEN` arguments match successfully. In its simple form, there is only one expression to evaluate and it immediately follows the `CASE` keyword: MATCH (n) RETURN CASE n.title WHEN 'Engineer' THEN 100 WHEN 'Scientist' THEN 80 ELSE n.privileges END In its generic form, no expression follows the `CASE` keyword. Instead, each `WHEN` statement specifies its own expression: MATCH (n) RETURN CASE WHEN n.age < 18 THEN '0-18' WHEN n.age < 30 THEN '18-30' ELSE '30+' END #### [](https://docs.falkordb.com/cypher/functions.html#reduce) Reduce The `reduce()` function accepts a starting value and updates it by evaluating an expression against each element of the list: RETURN reduce(sum = 0, n IN [1,2,3] | sum + n) `sum` will successively have the values 0, 1, 3, and 6, with 6 being the output of the function call. ### [](https://docs.falkordb.com/cypher/functions.html#intern) Intern The `intern()` function expects a single string argument: "CREATE (:A {v:intern('VERY LONG STRING')})" This function deduplicates the input string by storing a single internal copy across the database. It is especially useful for repeated string values—like country names, email domains, or tags—in large graphs. Interned strings can be stored as node or relationship properties, and behave identically to regular strings in queries, with the added benefit of reduced memory usage. ### [](https://docs.falkordb.com/cypher/functions.html#point) Point The `point()` function expects one map argument of the form: RETURN point({latitude: lat_value, longitude: lon_val}) The key names `latitude` and `longitude` are case-sensitive. The point constructed by this function can be saved as a node/relationship property or used within the query, such as in a `distance` function call. ### [](https://docs.falkordb.com/cypher/functions.html#about-path-functions) About Path Functions The following graph: ![Road network](https://docs.falkordb.com/images/road_network.png) represents a road network with 7 cities (A, B, C, and so on) and 11 one-way roads. Each road has a distance (say, in kilometers) and trip time (say, in minutes). #### [](https://docs.falkordb.com/cypher/functions.html#shortestpath) shortestPath `shortestPath` returns one of the shortest paths. If there is more than one, only one is retrieved. The sole `shortestPath` argument is a traversal pattern. This pattern’s endpoints must be resolved prior to the function call, and no property filters may be introduced in the pattern. The relationship pattern may specify any number of relationship types (including zero) to be considered. If a minimum number of edges to traverse is specified, it may only be 0 or 1, while any number may be used for the maximum. If 0 is specified as the minimum, the source node will be included in the returned path. If no shortest path can be found, NULL is returned. Example Usage: Find the shortest path (by number of roads) from A to G $ GRAPH.QUERY g "MATCH (a:City{name:'A'}),(g:City{name:'G'}) WITH shortestPath((a)-[*]->(g)) as p RETURN length(p), [n in nodes(p) | n.name] as pathNodes" 1) 1) "length(p)" 2) "pathNodes" 2) 1) 1) (integer) 3 2) "[A, D, F, G]" ![Road network](https://docs.falkordb.com/images/graph_query_road.png) #### [](https://docs.falkordb.com/cypher/functions.html#allshortestpaths) allShortestPaths All `allShortestPaths` results have, by definition, the same length (number of roads). Examples Usage: Find all the shortest paths (by number of roads) from A to G $ GRAPH.QUERY g "MATCH (a:City{name:'A'}),(g:City{name:'G'}) WITH a,g MATCH p=allShortestPaths((a)-[*]->(g)) RETURN length(p), [n in nodes(p) | n.name] as pathNodes" 1) 1) "length(p)" 2) "pathNodes" 2) 1) 1) (integer) 3 2) "[A, D, F, G]" 2) 1) (integer) 3 2) "[A, C, F, G]" 3) 1) (integer) 3 2) "[A, D, E, G]" 4) 1) (integer) 3 2) "[A, B, E, G]" Using the unbounded traversal pattern `(a:City{name:'A'})-[*]->(g:City{name:'G'})`, FalkorDB traverses all possible paths from A to G. `ORDER BY length(p) LIMIT 5` ensures that you collect only \[up to 5 shortest paths (minimal number of relationships). This approach is very inefficient because all possible paths would have to be traversed. Ideally, you would want to abort some traversals as soon as you are sure they would not result in the discovery of shorter paths.\ \ ### [](https://docs.falkordb.com/cypher/functions.html#json-format)\ JSON format\ \ `toJSON()` returns the input value in JSON formatting. For primitive data types and arrays, this conversion is conventional. Maps and map projections (`toJSON(node { .prop} )`) are converted to JSON objects, as are nodes and relationships.\ \ The format for a node object in JSON is:\ \ {\ "type": "node",\ "id": id(int),\ "labels": [label(string) X N],\ "properties": {\ property_key(string): property_value X N\ }\ }\ \ \ The format for a relationship object in JSON is:\ \ {\ "type": "relationship",\ "id": id(int),\ "relationship": type(string),\ "properties": {\ property_key(string): property_value X N\ }\ "start": src_node(node),\ "end": dest_node(node)\ }\ \ \ ### [](https://docs.falkordb.com/cypher/functions.html#variable-length-traverse-filtering)\ Variable length traverse filtering\ \ Consider a logistics network where:\ \ * Nodes (Warehouse) represent distribution centers.\ * Edges (Shipment) represent routes where packages are shipped.\ * Each shipment has an increasing priority level.\ \ Imagine a package tracking system where deliveries follow a priority-based routing:\ \ * Each shipment (Shipment) has a priority value (s.priority).\ * We want to ensure that package priority never decreases as it moves through the network.\ * The query filters paths where the previous shipment (prev(s.priority)) has a lower or equal priority than the current one (s.priority).\ \ MATCH p=(:Warehouse)-[s:Shipment]->(:Warehouse)\ WHERE coalesce(prev(s.priority), s.priority) <= s.priority\ RETURN p\ \ \ * `MATCH p=(:Warehouse)-[s:Shipment]->(:Warehouse)` Finds shipment paths between warehouses.\ * `WHERE coalesce(prev(s.priority)) <= s.priority` Ensures that priority never decreases along the route.\ * `RETURN p` Returns valid paths where shipments maintain or increase priority.\ \ * * * --- # Migration | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/operations/migration/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/operations/migration/#migration) Migration ======================================================================= The Migration section provides comprehensive guides for migrating your data to FalkorDB from other systems. Whether you’re moving from RedisGraph, Neo4j, Kuzu, RDF-based data stores, or migrating and continuously syncing from SQL sources, these step-by-step guides will help you seamlessly transition your data and applications to FalkorDB. [](https://docs.falkordb.com/operations/migration/#topics-in-this-section) Topics in This Section ------------------------------------------------------------------------------------------------- * [RedisGraph to FalkorDB](https://docs.falkordb.com/operations/migration/redisgraph-to-falkordb.html) : Migrate seamlessly from RedisGraph to FalkorDB using RDB files. * [Neo4j to FalkorDB](https://docs.falkordb.com/operations/migration/neo4j-to-falkordb.html) : Export data from Neo4j and import it into FalkorDB using CSV files. * [Kuzu to FalkorDB](https://docs.falkordb.com/operations/migration/kuzu-to-falkordb.html) : Transfer your Kuzu database to FalkorDB with automated schema discovery. * [RDF to FalkorDB](https://docs.falkordb.com/operations/migration/rdf-to-falkordb.html) : Migrate RDF (TTL) data to FalkorDB with schema extraction and CSV export. * [SQL Sources to FalkorDB (Online Migration)](https://docs.falkordb.com/operations/migration/sql-to-falkordb.html) : Online migration and incremental sync from SQL sources (PostgreSQL, Snowflake, Databricks) into FalkorDB. * * * Table of contents ----------------- * [RedisGraph to FalkorDB](https://docs.falkordb.com/operations/migration/redisgraph-to-falkordb.html) * [Neo4j to FalkorDB](https://docs.falkordb.com/operations/migration/neo4j-to-falkordb.html) * [Kuzu to FalkorDB](https://docs.falkordb.com/operations/migration/kuzu-to-falkordb.html) * [RDF to FalkorDB](https://docs.falkordb.com/operations/migration/rdf-to-falkordb.html) * [SQL Sources to FalkorDB (Online Migration)](https://docs.falkordb.com/operations/migration/sql-to-falkordb.html) * * * --- # GraphRAG-SDK | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#graphrag-sdk) GraphRAG-SDK ===================================================================================== ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#build-intelligent-graphrag-applications-with-falkordb-and-llms) Build intelligent GraphRAG applications with FalkorDB and LLMs * Automatically converts natural language questions into high-quality [Cypher](https://docs.falkordb.com/cypher/) queries. * Automatically generates contextually relevant answers from knowledge graph data. * Supports streaming responses and conversational sessions. * Integrates with multiple language model providers (OpenAI, Gemini, Groq, etc.). **Resources:** * [GraphRAG-SDK GitHub Repository](https://github.com/FalkorDB/GraphRAG-SDK) * [Documentation and Examples](https://github.com/FalkorDB/GraphRAG-SDK#readme) [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#quick-start) Quick Start ----------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#start-falkordb-graph-instance) Start FalkorDB Graph Instance docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:edge Or sign up for [FalkorDB Cloud](https://app.falkordb.cloud/) ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#install-sdk--environment-configuration) Install SDK & Environment Configuration pip install graphrag_sdk # FalkorDB Connection (defaults are for on-premises) export FALKORDB_HOST="localhost" export FALKORDB_PORT=6379 export FALKORDB_USERNAME="your-username" # optional for on-premises export FALKORDB_PASSWORD="your-password" # optional for on-premises # LLM Provider (choose one) export OPENAI_API_KEY="your-key" # or GOOGLE_API_KEY, GROQ_API_KEY, etc. ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#basic-usage) Basic Usage import os from falkordb import FalkorDB from graphrag_sdk import KnowledgeGraph from graphrag_sdk.ontology import Ontology from graphrag_sdk.models.litellm import LiteModel from graphrag_sdk.model_config import KnowledgeGraphModelConfig graph_name = "my_existing_graph" # Connect to FalkorDB using environment variables db = FalkorDB( host=os.getenv("FALKORDB_HOST", "localhost"), port=os.getenv("FALKORDB_PORT", 6379), username=os.getenv("FALKORDB_USERNAME"), # optional for on-premises password=os.getenv("FALKORDB_PASSWORD") # optional for on-premises ) # Select graph graph = db.select_graph(graph_name) # Extract ontology from existing knowledge graph ontology = Ontology.from_kg_graph(graph) # Configure model and create GraphRAG instance model = LiteModel() # Default is OpenAI GPT-4o, can specify different model model_config = KnowledgeGraphModelConfig.with_model(model) # Create KnowledgeGraph instance kg = KnowledgeGraph( name=graph_name, model_config=model_config, ontology=ontology, host=os.getenv("FALKORDB_HOST", "localhost"), port=os.getenv("FALKORDB_PORT", 6379), username=os.getenv("FALKORDB_USERNAME"), password=os.getenv("FALKORDB_PASSWORD") ) # Start chat session chat = kg.chat_session() # Ask questions response = chat.send_message("What products are available?") print(response["response"]) # Ask follow-up questions response = chat.send_message("Tell me which one of them is the most expensive") print(response["response"]) [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#key-features) Key Features ------------------------------------------------------------------------------------- * **Ontology Extraction**: Automatically extract schema and attributes from existing knowledge graphs * **Smart Query Generation**: Convert natural language questions to optimized Cypher queries * **Conversational Context**: Maintain chat history for contextual follow-up questions * **Streaming Support**: Real-time response chunks for better user experience * **Flexible Sources**: Create ontologies from JSON, existing graphs, or data sources * **Schema Management**: Build ontologies from graph schemas or knowledge graphs with sampling [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#how-it-works) How it works ------------------------------------------------------------------------------------- ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#1%EF%B8%8F%E2%83%A3-extract-and-build-ontologies-from-multiple-sources) 1️⃣ Extract and Build Ontologies from Multiple Sources * **From Existing Graphs**: Automatically extract schema and attributes from knowledge graphs using `Ontology.from_kg_graph()` * **From Data Sources**: Generate ontologies from diverse formats (PDF, CSV, HTML, TXT, JSON, URLs) using AI * **From Schema Graphs**: Import ontologies directly from graph schemas with `Ontology.from_schema_graph()` * **From JSON**: Load pre-defined ontologies from JSON configurations ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#2%EF%B8%8F%E2%83%A3-intelligent-query-generation-and-execution) 2️⃣ Intelligent Query Generation and Execution * **Natural Language Processing**: Convert user questions into optimized Cypher queries using LLMs * **Context-Aware Generation**: Leverage ontology schema to ensure accurate and relevant queries * **Multi-Step Pipeline**: Execute graph queries and synthesize natural language responses ### [](https://docs.falkordb.com/genai-tools/graphrag-sdk.html#3%EF%B8%8F%E2%83%A3-interactive-chat-sessions-with-graph-context) 3️⃣ Interactive Chat Sessions with Graph Context * **Conversational Interface**: Maintain chat history for contextual follow-up questions * **Streaming Responses**: Real-time response chunks for better user experience * **Flexible Model Support**: Compatible with multiple LLM providers (OpenAI, Gemini, Groq) > 📓 [Understanding Ontologies and Knowledge Graphs](https://www.falkordb.com/blog/understanding-ontologies-knowledge-graph-schemas/) * * * --- # GRAPH.RO_QUERY | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/commands/graph.ro-query.html#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/commands/graph.ro-query.html#graphro_query) GRAPH.RO\_QUERY ======================================================================================== Executes a given read only query against a specified graph. Arguments: `Graph name, Query, Timeout [optional]` Returns: [Result set](https://docs.falkordb.com/design/result-structure) for a read only query or an error if a write query was given. python javascript rust java shell Copy graph.ro_query("MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p") Copy const result = await graph.ro_query("MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p"); console.log(result); Copy let result = graph.ro_query(r#"MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p"#).execute().await?; println!("{:?}", result); Copy ResultSet result = graph.readOnlyQuery("MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p"); System.out.println(result); Copy GRAPH.RO_QUERY us_government "MATCH (p:president)-[:born]->(:state {name:'Hawaii'}) RETURN p" Query-level timeouts can be set as described in [the configuration section](https://docs.falkordb.com/configuration#timeout) . * * * --- # Cloud DBaaS | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/cloud/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs ![FalkorDB Cloud Banner](https://github.com/user-attachments/assets/e436f01d-d60a-42cf-ac76-7e457180482e) [](https://docs.falkordb.com/cloud/#falkordb-cloud-dbaas) FalkorDB Cloud DBaaS ============================================================================== Get started with FalkorDB’s cloud offering. The platform provides several enterprise features, including multi-tenancy, across all tiers. Browse the available plans and select the one that suits your needs. You can scale and upgrade your deployment when ready. [](https://docs.falkordb.com/cloud/#features--services) Features & Services --------------------------------------------------------------------------- | Group | Features | | --- | --- | | **Availability & Resilience** | \- High Availability
\- Multi-zone Deployment
\- Multi-Graph / Multi-Tenancy
\- Automated Backups\*
\- Continuous Persistence | | **Security & Access** | \- TLS
\- VPC Peering | | **Deployment & Scaling** | \- Dedicated Cluster Deployment
\- Scalability | | **Support & Monitoring** | \- Dedicated Support
\- Advanced Monitoring
\- Dedicated Account Manager | | ☁️ **Cloud Providers** | \- AWS
\- GCP
\- Azure (BYOC) | > * Automated backups are provided every 2 hours for Enterprise accounts [![Learn More](https://img.shields.io/badge/Learn%20More-8A2BE2?style=for-the-badge)](https://github.com/FalkorDB/docs/edit/Cloud-Docs/cloud/features.md) * * * ### [](https://docs.falkordb.com/cloud/#billing--setup) Billing & Setup ℹ️ Prior to subscribing to any of FalkorDB’s paid cloud tiers, please set up your billing information here: > Adding your billing information is an easy, 2-step process: > > 1. Create a billing account ([Link](https://app.falkordb.cloud/billing) > ) > 2. Input your billing information ![FDB-cloud-billing-how-to](https://github.com/user-attachments/assets/d5d6ce47-0bbc-4c71-b5fa-60a43677fb3f) [](https://docs.falkordb.com/cloud/#free-tier) Free Tier -------------------------------------------------------- The FalkorDB Free Tier provides a free FalkorDB instance for evaluation purposes. You can deploy, connect, and share the instance with minimal effort and no maintenance. [![Learn More](https://img.shields.io/badge/Learn%20More-8A2BE2?style=for-the-badge)](https://github.com/FalkorDB/docs/blob/main/cloud/free-tier.md) [![Watch Demo](https://img.shields.io/badge/Watch%20Demo-black?style=for-the-badge)](https://www.youtube.com/watch?v=z0XO4pb2t5Y) [](https://docs.falkordb.com/cloud/#startup-tier) Startup Tier -------------------------------------------------------------- The FalkorDB Startup Tier provides a production-ready standalone FalkorDB deployment. Pick your machine size, add a dataset size, and start extracting insights. [![Learn More](https://img.shields.io/badge/Learn%20More-8A2BE2?style=for-the-badge)](https://github.com/FalkorDB/docs/blob/main/cloud/startup-tier.md) [![Watch Demo](https://img.shields.io/badge/Watch%20Demo-black?style=for-the-badge)](https://www.youtube.com/watch?v=xjpLPoQgo2s) [](https://docs.falkordb.com/cloud/#pro-tier) Pro Tier ------------------------------------------------------ The Pro Tier provides a robust, dedicated environment to scale your application, including highly-available setups. [![Learn More](https://img.shields.io/badge/Learn%20More-8A2BE2?style=for-the-badge)](https://github.com/FalkorDB/docs/blob/main/cloud/pro-tier.md) [![Watch Demo](https://img.shields.io/badge/Watch%20Demo-black?style=for-the-badge)](https://youtu.be/UIzrW9otvYM?si=P1too6QjZ5r9AHtB) [](https://docs.falkordb.com/cloud/#enterprise) Enterprise ---------------------------------------------------------- The Enterprise Tier is fully optimized for mission-critical applications, providing the highest levels of security, availability, and dedicated operational support. Schedule a call with a FalkorDB solutions architect to learn more. [![Learn More](https://img.shields.io/badge/Learn%20More-8A2BE2?style=for-the-badge)](https://github.com/FalkorDB/docs/blob/main/cloud/enterprise-tier.md) [![Watch Demo](https://img.shields.io/badge/Watch%20Demo-black?style=for-the-badge)](https://youtu.be/fu_8CLFKYSs?si=G7K6dN1i5tyqXTfC) * * * Table of contents ----------------- * [Free Tier](https://docs.falkordb.com/cloud/free-tier.html) * [Startup Tier](https://docs.falkordb.com/cloud/startup-tier.html) * [Pro Tier](https://docs.falkordb.com/cloud/pro-tier.html) * [Enterprise Tier](https://docs.falkordb.com/cloud/enterprise-tier.html) * [Features](https://docs.falkordb.com/cloud/features.html) * * * --- # Agentic Memory | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/agentic-memory/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/agentic-memory/#agentic-memory) Agentic Memory =========================================================================== Agentic memory enables AI agents to maintain persistent, contextual memory across interactions. FalkorDB provides an ideal foundation for implementing agentic memory systems through its graph database capabilities, allowing agents to store, retrieve, and reason over complex relationships and temporal information. [](https://docs.falkordb.com/agentic-memory/#what-is-agentic-memory) What is Agentic Memory? -------------------------------------------------------------------------------------------- Agentic memory refers to the ability of AI agents to: * **Remember past interactions** and learn from them * **Build contextual understanding** through connected knowledge * **Reason over temporal information** to understand how relationships evolve * **Share memory across agents** in multi-agent systems * **Scale efficiently** as knowledge grows [](https://docs.falkordb.com/agentic-memory/#why-falkordb-for-agentic-memory) Why FalkorDB for Agentic Memory? -------------------------------------------------------------------------------------------------------------- FalkorDB’s graph database architecture makes it uniquely suited for agentic memory: * **Graph-Native Storage**: Natural representation of entities, relationships, and contexts * **Fast Traversals**: Quick retrieval of connected information for context-aware responses * **Temporal Support**: Track how knowledge and relationships change over time * **Multi-Tenant Architecture**: Isolated memory spaces for different agents or users * **Hybrid Search**: Combine vector similarity with graph relationships for precise retrieval * **High Performance**: Scale from prototype to production seamlessly [](https://docs.falkordb.com/agentic-memory/#agentic-memory-frameworks) Agentic Memory Frameworks ------------------------------------------------------------------------------------------------- This section covers popular frameworks and tools that implement agentic memory with FalkorDB: * [**Graphiti**](https://docs.falkordb.com/agentic-memory/graphiti.html) : A temporally-aware knowledge graph framework designed for multi-agent AI systems with persistent memory * [**Graphiti MCP Server**](https://docs.falkordb.com/agentic-memory/graphiti-mcp-server.html) : Run Graphiti as an MCP server for Claude Desktop, Cursor IDE, and other AI clients _(Experimental)_ * [**Cognee**](https://docs.falkordb.com/agentic-memory/cognee.html) : A memory management framework for AI agents that combines graph and vector storage * [**Mem0**](https://docs.falkordb.com/agentic-memory/mem0.html) : Add FalkorDB as a graph memory backend for Mem0 AI agents with per-user graph isolation [](https://docs.falkordb.com/agentic-memory/#getting-started) Getting Started ----------------------------------------------------------------------------- Choose a framework based on your needs: * If you need **temporal reasoning** and **multi-agent memory**, start with [Graphiti](https://docs.falkordb.com/agentic-memory/graphiti.html) * If you want to add **persistent memory to Claude Desktop or Cursor IDE**, try the [Graphiti MCP Server](https://docs.falkordb.com/agentic-memory/graphiti-mcp-server.html) * If you need **flexible memory structures** with **hybrid storage**, explore [Cognee](https://docs.falkordb.com/agentic-memory/cognee.html) * If you’re using **Mem0 AI agents** and want **graph-structured memory**, integrate with [Mem0](https://docs.falkordb.com/agentic-memory/mem0.html) All frameworks integrate seamlessly with FalkorDB and can be used together in complex systems. * * * Table of contents ----------------- * [Graphiti](https://docs.falkordb.com/agentic-memory/graphiti.html) * [Cognee](https://docs.falkordb.com/agentic-memory/cognee.html) * [Graphiti MCP Server](https://docs.falkordb.com/agentic-memory/graphiti-mcp-server.html) * [Mem0](https://docs.falkordb.com/agentic-memory/mem0.html) * * * --- # Browser | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/browser/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/browser/#falkordb-graph-visualization-tool-browser) FalkorDB Graph Visualization Tool (Browser) ============================================================================================================================ FalkorDB’s Browser provides a web UI for exploring, querying, and managing FalkorDB graphs. It allows developers to interact with graphs loaded to FalkorDB, explore how specific queries behave, and review the current data model. FalkorDB Browser integrates within the main FalkorDB Docker container and through the Cloud service. ![FalkorDB Browser GIF_01-26(1)](https://github.com/user-attachments/assets/af4f4d1c-111a-46a4-8442-8c08c037014f) * * * [](https://docs.falkordb.com/browser/#ui-elements) UI elements -------------------------------------------------------------- For detailed documentation of each major UI element (login, settings, graph canvas, panels, query editor/history, table view, etc.), see: * [UI Elements](https://docs.falkordb.com/browser/ui/) * * * [](https://docs.falkordb.com/browser/#main-features) Main Features ------------------------------------------------------------------ ### [](https://docs.falkordb.com/browser/#graph-exploration-graph-page) Graph exploration (Graph page) | Feature | Description | | --- | --- | | Interactive graph canvas | Visualizes query results containing nodes and edges as an interactive graph. Supports pan, zoom, and interaction with nodes and relationships. Toggles visibility by labels and relationship types. | | Element search (in-canvas search) | Search nodes and edges by node properties (string prefix match), IDs, relationship type, and labels. | | Data and inspection panel | Selecting an element opens a side panel for inspecting its properties. This panel supports editing workflows (see “Data manipulation”). | | Entity Creation Tools | Add a node, an edge, or both to the current graph from the canvas view. | ### [](https://docs.falkordb.com/browser/#querying) Querying | Feature | Description | | --- | --- | | Cypher query editor (Monaco) | Includes keyboard shortcuts: Run (Enter and Cmd/Ctrl + Enter) and Insert newline (Shift + Enter). Includes Cypher keyword and function completion. | | Results views | Graph view for node and edge results. Table view for tabular results. | | Query metadata | The Metadata tab shows query metadata text, explain plan (nested tree), and profile output (nested tree). | ### [](https://docs.falkordb.com/browser/#query-history) Query history | Feature | Description | | --- | --- | | Persistent query history | Stores in browser localStorage. | | History browser dialog | Search and filter previous queries by graph name; supports single or multi-select delete. | | Per-query metadata | Review metadata, explain, and profile for past queries. | ![query-history-eye-candy](https://github.com/user-attachments/assets/be000961-f456-4b04-adf0-96f754b7447a) ### [](https://docs.falkordb.com/browser/#data-manipulation-nodesrelationships) Data manipulation (nodes/relationships) | Feature | Description | | --- | --- | | Create and delete operations | Create node and create relationship flows from the Graph UI. Delete elements (node or relationship) from the Graph UI. | | Edit labels | Edit labels through API routes (the UI provides label management components). | ### [](https://docs.falkordb.com/browser/#graph-management) Graph management | Feature | Description | | --- | --- | | Create graphs | Create graphs from the UI. | | Delete graphs | Delete graphs (supports deleting multiple selected graphs). | | Duplicate graphs | Create a copy of an existing graph (including data). | | Export graphs | Download a .dump file via the Browser (/api/graph/:graph/export). | | Upload data | Upload data through the “Upload Data” dialog, which supports drag-and-drop file selection. | ### [](https://docs.falkordb.com/browser/#graph-info-panel) Graph Info panel | Feature | Description | | --- | --- | | Memory Usage tracking | Exposes current memory utilization of the graph in MB. | | Node Label tracking | Displays all node labels and controls style visualization. Click a label to trigger a query for those nodes. | | Edge Type tracking | Displays all edge types. Click an edge type to trigger a query showing connected nodes. | | Property Keys tracking | Displays all property keys. Click a key to see nodes and edges where the property exists. | ![falkordb-browser-eye-candy](https://github.com/user-attachments/assets/74375cd1-c704-40a9-9339-f1f885135a75) * * * ### [](https://docs.falkordb.com/browser/#api-documentation) API Documentation | Feature | Description | | --- | --- | | Built-in Swagger UI | Available at `/docs`. Loads the OpenAPI spec from `/api/swagger`. Supports “Try it out” with `X-JWT-Only: true` headers. | ![browser-api-doc-eye-candy](https://github.com/user-attachments/assets/35b0ca72-83f7-4f16-927c-413bf5f65593) ### [](https://docs.falkordb.com/browser/#authentication--access-control) Authentication & access control | Feature | Description | | --- | --- | | Authentication | Uses NextAuth (credentials-backed) for authentication. | | Role-aware UI capabilities | Read-Only users cannot create graphs. Admins can access DB config and user management. | ### [](https://docs.falkordb.com/browser/#settings) Settings | Section | Description | | --- | --- | | Browser settings | Query timeouts, result limits, content persistence (auto-save), and display-text priority for node captions. | | DB configurations (Admin) | View and update server configuration values. | | Users (Admin) | List users, adjust roles, add or delete users. | | Personal Access Tokens | Generate tokens with optional expiration and revocation management. | * * * [](https://docs.falkordb.com/browser/#common-workflows) Common Workflows ------------------------------------------------------------------------ ### [](https://docs.falkordb.com/browser/#running-and-visualizing-queries) Running and visualizing queries | Step | Action | | --- | --- | | 1 | Go to Graphs and select a graph. | | 2 | Write a Cypher query in the editor and run it. | | 3 | Inspect results in the Graph tab (canvas) or Table tab (rows). | | 4 | Use Labels and Relationships toggles to focus the canvas. | ### [](https://docs.falkordb.com/browser/#inspecting-and-editing-elements) Inspecting and editing elements | Step | Action | | --- | --- | | 1 | Click a node or edge in the canvas. | | 2 | Use the Data panel to inspect properties and apply actions. | ### [](https://docs.falkordb.com/browser/#working-with-query-history) Working with query history | Step | Action | | --- | --- | | 1 | Open Query History and filter by graph or search text. | | 2 | Select a query and review Metadata, Explain, or Profile. | ### [](https://docs.falkordb.com/browser/#exporting-graph-data) Exporting graph data | Step | Action | | --- | --- | | 1 | Open graph management and select a graph. | | 2 | Click Export Data to download a `.dump` file. | * * * Table of contents ----------------- * [UI Elements](https://docs.falkordb.com/browser/ui/) * * * --- # The FalkorDB Design | FalkorDB Docs [Skip to main content](https://docs.falkordb.com/design/#main-content) Link Menu Expand (external link) Document Search Copy Copied [](https://www.falkordb.com/) Search FalkorDB Docs [](https://docs.falkordb.com/design/#the-falkordb-design) The FalkorDB Design ============================================================================= [](https://docs.falkordb.com/design/#abstract) Abstract ------------------------------------------------------- Graph-based data is everywhere nowadays. Facebook, Google, Twitter and Pinterest are just a few who’ve realize the power behind relationship data and are utilizing it to its fullest. As a direct result, we see a rise both in interest for and the variety of graph data solutions. With the introduction of [Redis Modules](http://antirez.com/news/106) we’ve recognized the great potential of introducing a graph data structure to the Redis arsenal, and developed FalkorDB. Bringing new graph capabilities to Redis through a native C implementation with an emphasis on performance, [FalkorDB](https://github.com/FalkorDB/FalkorDB) is now available as an open source project. In this documentation, we’ll discuss the internal design and features of FalkorDB and demonstrate its current capabilities. [](https://docs.falkordb.com/design/#falkordb-at-a-glance) FalkorDB At-a-Glance ------------------------------------------------------------------------------- FalkorDB is a graph database developed from scratch on top of Redis, using the new Redis Modules API to extend Redis with new commands and capabilities. Its main features include: * Simple, fast indexing and querying * Data stored in RAM using memory-efficient custom data structures * On-disk persistence * Tabular result sets * Uses the popular graph query language [openCypher](https://opencypher.org/) [](https://docs.falkordb.com/design/#a-little-taste-falkordb-in-action) A Little Taste: FalkorDB in Action ---------------------------------------------------------------------------------------------------------- Let’s look at some of the key concepts of FalkorDB using this example over the redis-cli tool: ### [](https://docs.falkordb.com/design/#constructing-a-graph) Constructing a graph It is common to represent entities as nodes within a graph. In this example, we’ll create a small graph with both actors and movies as its entities, and an “act” relation that will connect actors to the movies they acted in. We’ll use the graph.QUERY command to issue a CREATE query, which will introduce new entities and relations to our graph. graph.QUERY 'CREATE (: