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)
- Add Vector Db performance tests
- make apache commons libraries that are now part of neo4j as provided or exclude them
- separate docs pages for GenAI Assistant and RAG separate out from OpenAI page
- Remove `org.apache.commons.collections*` imports
- Better error messaging with vectordb procedures HOT 1
- Add support for the Reciprocal rank fusion in the Elastic procedures
- 5.20.0 APOC does NOT include core functions and neither does neo4j community edition 5.20.0 HOT 3
- apoc.export.csv.query() config for quotes: 'ifNeeded' produces invalid quotation HOT 1
- Better error messaging with vectordb query/get procedures
- Test if gemini-flash and gpt-4o work
- Add anthropic claude support
- Better document output of vector db procedures
- switch default model for cypher/schema interactions to gpt-4o
- The apoc.vectordb.weaviate.query and the apoc.vectordb.milvus.query/get should populate the `fields` config with the `metadataKey` if present
- apoc.load.jdbcUpdate doesn't work in apoc.periodic.repeat procedure
- Add support for loading Gephi GEXF file format
- apoc.load.jdbcUpdate inside apoc.periodic.iterate leaves idle connections from 5.19 and forward
- Add support for huggingface models
- Add support for Anthropic models
- APOC EXPORT CSVs - Add option to export "nothing" for NULL values instead of empty string HOT 1
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.