-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Adding sortable tag field support & UNF support #1862
Conversation
While you are in there, could support for the new UNF be added as well? RediSearch/RediSearch#2188 |
Support UNF with sortable
The main problem I can see here is the breaking change on For example: - public TextField(string name, double weight = 1.0, bool sortable = false, bool noStem = false, bool noIndex = false)
- : base(name, FieldType.FullText, sortable, noIndex)
+ public TextField(string name, double weight = 1.0, bool sortable = false, bool noStem = false, bool noIndex = false, bool unf = false)
+ : base(name, FieldType.FullText, sortable, noIndex, unf) could be achieved instead via: public TextField(string name, double weight, bool sortable, bool noStem, bool noIndex)
: this(name, weight, sortable, noStem, noIndex, false) {}
public TextField(string name, double weight = 1.0, bool sortable = false, bool noStem = false, bool noIndex = false, bool unf = false)
Likewise: - public Schema AddSortableTextField(string name, double weight = 1.0)
+ public Schema AddSortableTextField(string name, double weight = 1.0, bool unf = false) could be public Schema AddSortableTextField(string name, double weight)
=> AddSortableTextField(name, weight, false);
public Schema AddSortableTextField(string name, double weight = 1.0, bool unf = false) |
If we can fix ^^^, and add something to releasenotes.md, we should be set? |
oh: additional thought: what is I also wonder whether we're getting into the territory where a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, ta
TIL -> thanks for pointing that out. |
Adding the ability to add sorted tag fields in indices per #1838
Note: When serializing the arguments RediSearch cares about the order of the separator and sortable arguments, hence after calling
base.SerializeRedisArgs
, if the index is sortable and removes the sortable flag, and then adds it back after the separator flag is added.