Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output method to return directly nodes #5

Open
kuzeko opened this issue Apr 7, 2021 · 1 comment
Open

Output method to return directly nodes #5

kuzeko opened this issue Apr 7, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@kuzeko
Copy link
Collaborator

kuzeko commented Apr 7, 2021

Currently the method outputs nodeIds.
Can we have the method output nodes directly?

@kuzeko kuzeko added the enhancement New feature or request label Apr 7, 2021
@kuzeko
Copy link
Collaborator Author

kuzeko commented Apr 7, 2021

Currently I need to run this query:

MATCH (r:MyNodeType)
   WHERE r.name IN [ name1, name2, name3  ] 
   WITH collect(r) as nodeList
CALL particlefiltering.unlabelled(nodeList, 0, 1000) YIELD nodeId, score 
 WITH nodeId, score MATCH (r:MyNodeType) WHERE ID(r) = nodeId  
 RETURN r, score 
ORDER BY score DESC 
LIMIT 100

Ideally we should be able to run directly

MATCH (r:MyNodeType)
   WHERE r.name IN [ name1, name2, name3  ] 
   WITH collect(r) as nodeList
CALL particlefiltering.unlabelled(nodeList, 0, 1000) YIELD r, score 
 RETURN r, score 
ORDER BY score DESC 
LIMIT 100

so that for instance I can directly return something more meaningful, e.g.,

...
 RETURN r.name, r.price, score 
ORDER BY score DESC 
LIMIT 100


@kuzeko kuzeko changed the title Output method Output method to return directly nodes Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants