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

Make ExtentFilteredSet.index_doc only unindex values that were in the set #13

Merged
merged 1 commit into from May 13, 2021

Conversation

jamadden
Copy link
Member

This avoids a readCurrent call.

Fixes #12

@jamadden jamadden requested a review from jzuech3 May 13, 2021 18:40
# (TODO: Can there be persistence errors that break `in` but let
# `remove()` keep working?)
# See https://github.com/NextThought/nti.zope_catalog/issues/12
if docid in self._ids:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'self._ids' may be None correct?

Along with that, what type is _ids - is the lookup cheap?

Copy link
Member Author

@jamadden jamadden May 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it can't be None. It's set from __init__ -> clear().

It's a TreeSet.

Copy link

@jzuech3 jzuech3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jamadden jamadden merged commit 940028c into master May 13, 2021
@jamadden jamadden deleted the issue12 branch May 13, 2021 20:26
@jamadden
Copy link
Member Author

Thanks. It's on PyPI.

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

Successfully merging this pull request may close these issues.

ExtentFilteredSet: index_doc results in extra readCurrent calls for rejected objects
2 participants