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
Search and Navigator do not return all results #127
Comments
I think this is related to #116. Have you tried setting |
I did try using joinAlgorithm: 'basic', and I got the same results. I'm not completely sure I'm using the Navigator correctly. I do seem to be getting better results using a searchStream though. |
Probably you are not using the navigator correctly, but it is perfectly use just searchStream. Navigator is built on top of searchStream. |
I can confirm that this is occurring for both search and search stream as well, and for both sort and basic join algorithms. I've narrowed down the conditions under which it omits results. Always correct:
Omits results:
For example:
Adding more db variables doesn't change the result count, just which values are returned. I would be happy to help fix this, though I'm not really sure where to start. If someone could point me in the right direction, I'll submit a PR and do some troubleshooting. |
The search is supped to be used with the full pattern specified. Does that change anything? Anyway, the first step to address this issue is writing a unit test that cover this case. Add one to: https://github.com/mcollina/levelgraph/blob/master/test/abstract_join_algorithm.js |
Hello. I've been building a database to store file metadata, and I've noticed that my search results are not returning many of the matching objects.
For example, my database uses a "folder" type node to group objects so I can query smaller sections of the graph. Like so:
If I perform a search, or begin the navigator at 'red fish' it will correctly return the triples linking to all of the types of red fish. However, if I try to step further out using the navigator, or use more than 1 variable in the second object of a search, many of the results do not turn up. For example
db.nav('red fish').archOut('contains') ##This returns all of the red fish
db.nav.('red fish').archOut('contains').archOut(db.v('anything'))
^Shows some of the nodes linked to red fish, but is missing most of them^
A similarly structured search also omits many results:
If this isn't a bug, am I doing something completely wrong here? All I've been trying to do is get all of the nodes two links away from a specific node, regardless of the predicate or object, and it doesn't seem like there is any way to do this.
The text was updated successfully, but these errors were encountered: