Skip to content
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

Sortable tagfields #redisearch #6

Open
kishoretvk opened this issue Apr 27, 2020 · 1 comment
Open

Sortable tagfields #redisearch #6

kishoretvk opened this issue Apr 27, 2020 · 1 comment

Comments

@kishoretvk
Copy link

HI Team,
Thanks for the effort you guys put in, that helps everyone.
wanted to get this added to Nredisearch : it is present in Jredisearch as well here is the id from jredissearch repo
RediSearch/JRediSearch@751c644

can we get this added in NRedisearch as well ? we can't query sort on tagfields, Redissearch allows us to do it ,
hope we can get it enabled for NRedissearch too

@kishoretvk
Copy link
Author

kishoretvk commented Apr 27, 2020

we had this for sortable text in
https://github.com/StackExchange/StackExchange.Redis/blob/master/src/NRediSearch/Schema.cs

     /// <summary>
        /// Add a text field that can be sorted on.
        /// </summary>
        /// <param name="name">The field's name.</param>
        /// <param name="weight">Its weight, a positive floating point number.</param>
        /// <returns>The <see cref="Schema"/> object.</returns>
        public Schema AddSortableTextField(string name, double weight = 1.0)
        {
            Fields.Add(new TextField(name, weight, true));
            return this;
        }`
```



similarly, we a property like so would also help 

```
     /// <summary>
        /// Add a text field that can be sorted on.
        /// </summary>
        /// <param name="name">The field's name.</param>
        /// <param name="weight">Its weight, a positive floating point number.</param>
        /// <returns>The <see cref="Schema"/> object.</returns>
        public Schema AddSortableTagField(string name, double weight = 1.0)
        {
            Fields.Add(new TagField(name, weight, true));
            return this;
        }
```

@NickCraver NickCraver transferred this issue from StackExchange/StackExchange.Redis Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant