Skip to content

Commit d44da9a

Browse files
authored
[docs]assorted Neo4j documentations (#1213)
[documentation] neo4j related documentation dos
1 parent a9daecc commit d44da9a

File tree

3 files changed

+17
-26
lines changed

3 files changed

+17
-26
lines changed

docs/docs/examples/examples/docs_to_knowledge_graph.md

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ and then build a knowledge graph.
3838
## Setup
3939
* [Install PostgreSQL](https://cocoindex.io/docs/getting_started/installation#-install-postgres). CocoIndex uses PostgreSQL internally for incremental processing.
4040
* [Install Neo4j](https://cocoindex.io/docs/targets/neo4j#neo4j-dev-instance), a graph database.
41+
42+
<DocumentationButton url="https://cocoindex.io/docs/targets/neo4j" text="Neo4j" margin="0 0 16px 0" />
4143
* [Configure your OpenAI API key](https://cocoindex.io/docs/ai/llm#openai). Alternatively, we have native support for Gemini, Ollama, LiteLLM. You can choose your favorite LLM provider and work completely on-premises.
4244

4345
<DocumentationButton url="https://cocoindex.io/docs/ai/llm" text="LLM" margin="0 0 16px 0" />
@@ -357,6 +359,9 @@ And then open the url `https://cocoindex.io/cocoinsight`. It just connects to y
357359
## Browse the knowledge graph
358360
After the knowledge graph is built, you can explore the knowledge graph you built in Neo4j Browser.
359361
362+
<DocumentationButton url="https://cocoindex.io/docs/targets/neo4j" text="Neo4j" margin="0 0 16px 0" />
363+
364+
360365
For the dev environment, you can connect to Neo4j browser using credentials:
361366
- username: `Neo4j`
362367
- password: `cocoindex`
@@ -368,28 +373,4 @@ You can open it at [http://localhost:7474](http://localhost:7474), and run the f
368373
MATCH p=()-->() RETURN p
369374
```
370375
371-
## Kuzu
372-
Cocoindex natively supports Kuzu - a high performant, embedded open source graph database.
373-
374-
<DocumentationButton url="https://cocoindex.io/docs/targets/kuzu" text="Kuzu" margin="0 0 16px 0" />
375-
376-
The GraphDB interface in CocoIndex is standardized, you just need to **switch the configuration** without any additional code changes. CocoIndex supports exporting to Kuzu through its API server. You can bring up a Kuzu API server locally by running:
377-
378-
``` sh
379-
KUZU_DB_DIR=$HOME/.kuzudb
380-
KUZU_PORT=8123
381-
docker run -d --name kuzu -p ${KUZU_PORT}:8000 -v ${KUZU_DB_DIR}:/database kuzudb/api-server:latest
382-
```
383-
384-
In your CocoIndex flow, you need to add the Kuzu connection spec to your flow.
385-
386-
```python
387-
kuzu_conn_spec = cocoindex.add_auth_entry(
388-
"KuzuConnection",
389-
cocoindex.storages.KuzuConnection(
390-
api_server_url="http://localhost:8123",
391-
),
392-
)
393-
```
394-
395-
<GitHubButton url="https://github.com/cocoindex-io/cocoindex/blob/30761f8ab674903d742c8ab2e18d4c588df6d46f/examples/docs_to_knowledge_graph/main.py#L33-L37" margin="0 0 16px 0" />
376+
![Neo4j Browser](/img/examples/docs_to_knowledge_graph/neo4j_browser.png)

docs/docs/targets/neo4j.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,14 @@ You can access the Neo4j browser at [http://localhost:7474](http://localhost:747
4949
href="https://github.com/cocoindex-io/cocoindex/tree/main/examples/docs_to_knowledge_graph"
5050
text="Docs to Knowledge Graph"
5151
margin="16px 0 24px 0"
52-
/>
52+
/>
53+
54+
## Data Clean up between different projects
55+
If you are building multiple CocoIndex flows from different projects to neo4j, we recommend you to
56+
57+
- bring up separate container for each flow if you are on community edition, or
58+
- setup different databases within one container if you are on enterprise edition.
59+
60+
This way, you can clean up the data for each flow independently.
61+
62+
In case you need to clean up the data in the same database, you can do it manually by running `cocoindex drop <APP_TARGET>` from the project you want to clean up.
167 KB
Loading

0 commit comments

Comments
 (0)