Add separator parameter to Field() for TAG fields#800
Merged
Conversation
Fixes #488 - TAG separators are now honored when creating indexes. Users can specify custom separators via Field(separator=',')
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 929639e | Previous: b2d9cea | Ratio |
|---|---|---|---|
tests/test_benchmarks.py::TestSaveBenchmarks::test_hashmodel_save |
1514.5610658149646 iter/sec (stddev: 0.000029033475340073266) |
1834.5447902753788 iter/sec (stddev: 0.00012480683186627813) |
1.21 |
tests/test_benchmarks.py::TestSaveBenchmarks::test_jsonmodel_save |
2132.5322746012907 iter/sec (stddev: 0.00005164869512710772) |
2607.2666659856627 iter/sec (stddev: 0.00006986606486609657) |
1.22 |
tests/test_benchmarks.py::TestGetBenchmarks::test_hashmodel_get |
3241.6058292894345 iter/sec (stddev: 0.000018208804469583863) |
4159.820814863618 iter/sec (stddev: 0.000021689303138884947) |
1.28 |
tests/test_benchmarks.py::TestGetBenchmarks::test_jsonmodel_get |
2771.7680456918238 iter/sec (stddev: 0.00003780957359588817) |
3412.2202252527045 iter/sec (stddev: 0.00002946988605421251) |
1.23 |
tests/test_benchmarks.py::TestQueryBenchmarks::test_hashmodel_find_by_field |
2604.6418781438533 iter/sec (stddev: 0.0000429568269871859) |
3348.2265799656293 iter/sec (stddev: 0.00006448534426055602) |
1.29 |
tests/test_benchmarks.py::TestUpdateBenchmarks::test_hashmodel_update |
1548.1586804433807 iter/sec (stddev: 0.00009583876582559157) |
1994.5089572766312 iter/sec (stddev: 0.0000645868437082454) |
1.29 |
tests/test_benchmarks.py::TestUpdateBenchmarks::test_jsonmodel_update |
2399.5103655103294 iter/sec (stddev: 0.000034563893448722606) |
3052.543492194109 iter/sec (stddev: 0.000024030857967661033) |
1.27 |
This comment was automatically generated by workflow using github-action-benchmark.
Collaborator
Author
|
Hmm, these benchmark stats are going to be hard with CI's variability! Let's see where it goes though. |
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.
Fixes #488
Summary
Redis OM now honors custom TAG field separators when creating indexes. Previously, the
|separator was hardcoded, ignoring any custom separator configuration.Changes
separatorparameter toField()with default"|"HashModelandJsonModelto use the field's separatorUsage