Comments (7)
That's what dijkstraWithDefaultWeight
is for.
apoc.algo.dijkstraWithDefaultWeight(startNode, endNode, 'KNOWS|<WORKS_WITH|IS_MANAGER_OF>', 'distance', 10) YIELD path, weight
from neo4j-apoc-procedures.
Thank you, but I know about it. I think, nevertheless, it is not quite correct behavior of the procedure: it would be appropriate not to throw an exception if the property is not found, but reject (filter) this pattern (path).
In fact, the output will only include those paths in which every relationship has a property responsible for the weight, and this property is a number.
from neo4j-apoc-procedures.
Ok, fair point.
from neo4j-apoc-procedures.
How about using dijekstraWtihDefaultWeight with a very high default value? This way the given relationship should never become a shortest path. Would this be good enough?
from neo4j-apoc-procedures.
@stdob what do you think about @sarmbruster's suggestion?
from neo4j-apoc-procedures.
@jexp Works, but, in my opinion, this is a workaround ...
from neo4j-apoc-procedures.
I agree, if there is no valid property with a numerical value this should fail properly and filter the path. High default weight is a bit of a hack.
from neo4j-apoc-procedures.
Related Issues (20)
- check if the new openai embedding models work in an integration test
- apoc.refactor.cloneNodes() clones survive transaction rollback HOT 3
- Solve flaky cluster routing test
- Solve flaky mongodb test
- Query generates arbitrary nodes; termination doesn't roll them back HOT 2
- Solve MongoTest startup error
- Add support for Mistral AI for ml procedures
- Check how to integrate vector databases via rest APIs
- Add support for Groq AI for ml procedures
- apoc.convert.toTree() returns wrong result if there is a cycle from root of the path HOT 3
- apoc.convert.toTree include/exclude not working with multiple node labels
- Solve Cypher*Test and testSetupAndDropCustomsWithUseSystemClause
- Add self-explanation to the model, include the verbal schema description to the flow
- Top k parameters in just one call, to retrieve k results
- In case of the llm generates a wrong query, improve by sending the query with the error to llm so it can improve instead of just generating new query, still retry with new query if no results
- Add a reverse explanation of the query: the input is a Cypher query the output is a natural language description of it, given the graph model.
- Given (a set of) queries return the schema + explanation of the subgraph
- Add a procedure for RAG you pass the user question plus a graph pattern (paths) and relevant attributes and it creates a prompt to answer the user question using the data on those paths and executes that with the llm provider and returns the answer
- apoc.export.csv.query() config for quotes: 'ifNeeded' not working HOT 3
- The apoc.cypher.runSchemaFile() never finishes execution HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neo4j-apoc-procedures.