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

NestedParent query missing valid result #573

Open
hlbnet opened this issue Sep 8, 2022 · 0 comments
Open

NestedParent query missing valid result #573

hlbnet opened this issue Sep 8, 2022 · 0 comments

Comments

@hlbnet
Copy link

hlbnet commented Sep 8, 2022

In some circumstances, a NestedParent query does not return what it should (see attached code to reproduce, change file extension to py).

First execute this code as-is. Output: "Found 1 document(s)" is ok.
Retry after uncommenting line 35. Output: "Found 0 document(s)" is wrong (should still find 1 document).

Additionnally, you can play with this example. If the content of the line 35 is moved after the line 40, the correct result will be observed again.

Using Whoosh 2.7.4 on Windows 10 with Python 3.10.4.

nestedparentbug.txt

The bug comes if a document matches the 'children' criteria of the NestedParent query. but is itself not in any group, or not in a group matching the 'parent' criteria. This document has no reason be be returned, and is not (good). But, the simple existence of this document makes that the query will not return any next result, even if other documents exists that should be returned by the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant