Remove non-TEXT fields from the spec's keys dictionary - [MOD-13150]#7871
Remove non-TEXT fields from the spec's keys dictionary - [MOD-13150]#7871
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7871 +/- ##
==========================================
+ Coverage 84.09% 84.23% +0.13%
==========================================
Files 360 360
Lines 56289 56225 -64
Branches 15717 15717
==========================================
+ Hits 47339 47362 +23
+ Misses 8734 8647 -87
Partials 216 216
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ofiryanai
left a comment
There was a problem hiding this comment.
few shallow comments, all in all good refactor
| } geometryOpts; | ||
| }; | ||
|
|
||
| // TODO: Move into union above when we stop supporting multi-type fields |
There was a problem hiding this comment.
@GuyAv46 You mean fields with option FieldSpec_Dynamic?
There was a problem hiding this comment.
Yes. Referring here to the text-only data and the numeric pointer
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.2
git worktree add -d .worktree/backport-7871-to-8.2 origin/8.2
cd .worktree/backport-7871-to-8.2
git switch --create backport-7871-to-8.2
git cherry-pick -x 5668dd1a51a6fd393c4f2721853ebd46528ff4e5 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.4
git worktree add -d .worktree/backport-7871-to-8.4 origin/8.4
cd .worktree/backport-7871-to-8.4
git switch --create backport-7871-to-8.4
git cherry-pick -x 5668dd1a51a6fd393c4f2721853ebd46528ff4e5 |
…7871) * move fields outside keysDict * remove dead defs * fix memory consumption test helper * test fixes * wip * reverting unnecessary changes * reverting unnecessary changes * fix memory calculations * fix memory calculations * small improvement * tidy ups * review fixes (cherry picked from commit 5668dd1)
…7871) * move fields outside keysDict * remove dead defs * fix memory consumption test helper * test fixes * wip * reverting unnecessary changes * reverting unnecessary changes * fix memory calculations * fix memory calculations * small improvement * tidy ups * review fixes (cherry picked from commit 5668dd1)
…3150] (#7887) * Remove non-TEXT fields from the spec's keys dictionary - [MOD-13150] (#7871) * move fields outside keysDict * remove dead defs * fix memory consumption test helper * test fixes * wip * reverting unnecessary changes * reverting unnecessary changes * fix memory calculations * fix memory calculations * small improvement * tidy ups * review fixes (cherry picked from commit 5668dd1) * fixes for 8.4
…3150] (#7886) * Remove non-TEXT fields from the spec's keys dictionary - [MOD-13150] (#7871) * move fields outside keysDict * remove dead defs * fix memory consumption test helper * test fixes * wip * reverting unnecessary changes * reverting unnecessary changes * fix memory calculations * fix memory calculations * small improvement * tidy ups * review fixes (cherry picked from commit 5668dd1) * fixes for 8.2
Describe the changes in the pull request
Today, when we want to get a non-text field index, we:
keysDictIn this PR, we move these objects from
keysDictand set them directly in the field spec. This eliminates the need for steps 2 and 3.In a following PR, we will simplify
keysDict, specifically the keys formatting, which, after this PR, is no longer required.Remove non-text fields from the spec's
keysDict, which should only be used for text inverted indexes.Deprecating
IndexSpec_GetFormattedKey- should only be used to upgrade legacy indexesMark if applicable
Note
Shifts ownership of non-TEXT indexes from the global
keysDictto per-field members onFieldSpec, simplifying lookups and lifecycle.fs->tree(numeric/geo),fs->tagOpts.tagIndex,fs->vectorOpts.vecSimIndex,fs->geometryOpts.geometryIndex; updatesFieldSpec_Cleanupto free themopenNumericOrGeoIndex(...),TagIndex_Open(FieldSpec*, ...),openVectorIndex(FieldSpec*, ...),OpenGeometryIndex(FieldSpec*, ...)IndexSpec_LegacyGetFormattedKey(...), renames helpers toHiddenString_LegacyDropFromKeySpaceandRedis_LegacyDeleteKey; use legacy paths only for dropping/upgrading old indexesNumericRangeTreetypedef) to new interfaces and lazy index creation behaviorWritten by Cursor Bugbot for commit 3d02cf2. This will update automatically on new commits. Configure here.