-
Notifications
You must be signed in to change notification settings - Fork 4
Compute nearest filters via indexed filter ranges #25
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
Open
mackinleysmith
wants to merge
11
commits into
get-convex:main
Choose a base branch
from
mackinleysmith:feat-nearest-filters-via-indexed-filter-ranges
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Compute nearest filters via indexed filter ranges #25
mackinleysmith
wants to merge
11
commits into
get-convex:main
from
mackinleysmith:feat-nearest-filters-via-indexed-filter-ranges
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rting options. Update README to reflect new options for maxDistance and filtering logic. Modify API definitions and implementations to support must/should filter conditions and sorting intervals. Add tests for new filtering functionality in closest point queries.
… and improve performance. Introduce a new buildStreamForCell method to manage filter conditions and optimize data retrieval. Update README to clarify maxDistance usage and filtering logic. Add tests for multiple filter scenarios in closest point queries.
…performance. Replace the buildStreamForCell method with direct database queries for point retrieval, enhancing clarity and efficiency. Introduce new helper methods for filter checks and sorting interval validation.
…etrieval and improving filter checks. Add methods for managing cell processing and fetching point entries in batches, optimizing performance and clarity in the query logic.
…precated filter methods. Introduce FILTER_SUBDIVIDE_THRESHOLD for enhanced performance in point retrieval, streamlining the query process.
…ove point retrieval logic. Introduce CellStreamState for better state handling during processing, and optimize filter checks and batch processing for improved performance.
…ia-indexed-filter-ranges
…necessary type assertions and directly using the context in query executions. This improves code clarity and maintains functionality.
commit: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a follow-on for #23 -- apologies if there is a better way to set the base branch here, but I couldn't find it, so this contains the content of both PRs.
Summary
queryNearestclient helper to the same filter builder used by rectangle queries, carryingfilteringandsorting.intervalthrough the Convex query layer.FilterKeyRangestreams with cell scans somust/shouldclauses are enforced before document fetches.Details
GeospatialIndex.queryNearestnow accepts either a distance or options object and builds filter/sort intervals that are passed tocomponent.query.nearestPoints.ClosestPointQueryfactors in filter conditions when choosing cell subdivisions and mergesFilterKeyRangestreams viaIntersection, usingPREFETCH_SIZEfrom the shared constants module.maxDistanceinteract, emphasizing the performance win from narrowing the search space.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.