cognee/cognee/modules
Pavel Zorin 007c7d403e Fix cypher search (#1739)
<!-- .github/pull_request_template.md -->

## Description
Resolve issue with cypher search by encoding the return value from the
cypher query into JSON. Uses fastapi json encoder


## Type of Change
<!-- Please check the relevant option -->
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
Example of result now with Cypher search with the following query "MATCH
(src)-[rel]->(nbr) RETURN src, rel" on Simple example:
```
{
   "search_result":[
      [
         [
            {
               "_id":{
                  "offset":0,
                  "table":0
               },
               "_label":"Node",
               "id":"87372381-a9fe-5b82-9c92-3f5dbab1bc35",
               "name":"",
               "type":"DocumentChunk",
               "created_at":"2025-11-05T14:12:46.707597",
               "updated_at":"2025-11-05T14:12:54.801747",
               "properties":"{\"created_at\": 1762351945009, \"updated_at\": 1762351945009, \"ontology_valid\": false, \"version\": 1, \"topological_rank\": 0, \"metadata\": {\"index_fields\": [\"text\"]}, \"belongs_to_set\": null, \"text\": \"\\n    Natural language processing (NLP) is an interdisciplinary\\n    subfield of computer science and information retrieval.\\n    \", \"chunk_size\": 48, \"chunk_index\": 0, \"cut_type\": \"paragraph_end\"}"
            },
            {
               "_src":{
                  "offset":0,
                  "table":0
               },
               "_dst":{
                  "offset":1,
                  "table":0
               },
               "_label":"EDGE",
               "_id":{
                  "offset":0,
                  "table":1
               },
               "relationship_name":"contains",
               "created_at":"2025-11-05T14:12:47.217590",
               "updated_at":"2025-11-05T14:12:55.193003",
               "properties":"{\"source_node_id\": \"87372381-a9fe-5b82-9c92-3f5dbab1bc35\", \"target_node_id\": \"bc338a39-64d6-549a-acec-da60846dd90d\", \"relationship_name\": \"contains\", \"updated_at\": \"2025-11-05 14:12:54\", \"relationship_type\": \"contains\", \"edge_text\": \"relationship_name: contains; entity_name: natural language processing (nlp); entity_description: An interdisciplinary subfield of computer science and information retrieval concerned with interactions between computers and human (natural) languages.\"}"
            }
         ]
      ]
   ],
   "dataset_id":"UUID(""af4b1c1c-90fc-59b7-952c-1da9bbde370c"")",
   "dataset_name":"main_dataset",
   "graphs":"None"
}
```
Relates to https://github.com/topoteretes/cognee/pull/1725
Issue: https://github.com/topoteretes/cognee/issues/1723

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-11-08 22:54:29 +01:00
..
chunking feat: adds temporal models for llm extraction 2025-08-27 15:14:46 +02:00
cloud feat: add welcome tutorial notebook for new users (#1425) 2025-09-18 18:07:05 +02:00
cognify fix: Initial commit to resolve issue with using tokenizer based on LLMs 2025-01-21 19:53:22 +01:00
data Chore: update deprecated exceptions (#1586) 2025-10-22 21:04:29 +02:00
engine fix: fixes distributed pipeline (#1454) 2025-10-09 14:06:25 +02:00
graph refactor: Rework limit=0 for vector adapters (#1450) 2025-09-25 21:13:41 +02:00
ingestion fix: Resolve issue with text classification 2025-10-30 14:27:01 +01:00
memify feat: Enable multi-user mode to work with memify 2025-09-04 20:59:00 +02:00
metrics/operations feat: websockets for pipeline update streaming (#851) 2025-06-11 20:29:26 +02:00
notebooks create starter notebook on get all notebooks request - if not created 2025-09-18 18:21:42 +01:00
observability add none to default as observability 2025-09-18 10:41:25 +02:00
ontology ruff fix 2025-10-27 13:47:04 +01:00
pipelines feature: adds new tenant id (if available) to telemetry packages for basic cognee operations (#1676) 2025-10-27 16:38:23 +01:00
retrieval Fix cypher search (#1739) 2025-11-08 22:54:29 +01:00
search feature: adds new tenant id (if available) to telemetry packages for basic cognee operations (#1676) 2025-10-27 16:38:23 +01:00
settings Added Mistral support as LLM provider using litellm 2025-10-12 11:44:33 +02:00
storage/utils feat: Weighted edges (#1068) 2025-07-14 21:26:25 +02:00
sync feat: update sync to be two way (#1359) 2025-09-11 15:34:43 +02:00
users chore: removes SimpleNameSpace (Igor) 2025-10-15 17:47:21 +02:00
visualization add fix 2025-10-29 10:28:10 +01:00
__init__.py chore: rename package 2024-03-13 16:08:11 +01:00