[2.0] Add UNF flag for SORTABLE fields (#2188) Improve FT.INFO complexity to O(1) (#2153)#2201
Merged
[2.0] Add UNF flag for SORTABLE fields (#2188) Improve FT.INFO complexity to O(1) (#2153)#2201
Conversation
* Add UNF flag for SORTABLE fields * add test (cherry picked from commit aa9808d)
rafie
reviewed
Aug 23, 2021
| const char *c = RedisModule_StringPtrLen(field->text, &fl); | ||
| if (FieldSpec_IsSortable(fs)) { | ||
| RSSortingVector_Put(aCtx->sv, fs->sortIdx, (void *)c, RS_SORTABLE_STR); | ||
| RSSortingVector_Put(aCtx->sv, fs->sortIdx, (void *)c, RS_SORTABLE_STR, fs->options & FieldSpec_UNF); |
Contributor
There was a problem hiding this comment.
I like to booleanize bitmask expresions (!!(fs->options & FieldSpec_UNF)). Not a must.
rafie
previously approved these changes
Aug 23, 2021
* Improve FT.INFO complexity to O(1) * split cardinality and size for MemUsage * Per meir's review * per review (cherry picked from commit e1a8af5)
Codecov Report
@@ Coverage Diff @@
## 2.0 #2201 +/- ##
==========================================
- Coverage 80.18% 80.18% -0.01%
==========================================
Files 146 146
Lines 21086 21091 +5
==========================================
+ Hits 16908 16911 +3
- Misses 4178 4180 +2
Continue to review full report at Codecov.
|
rafie
approved these changes
Aug 24, 2021
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
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.
Cherry-pick PR #2188 and #2153 to 2.0 branch.