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

Computed Search #115

Open
imansafari1991 opened this issue Feb 3, 2023 · 1 comment
Open

Computed Search #115

imansafari1991 opened this issue Feb 3, 2023 · 1 comment

Comments

@imansafari1991
Copy link

Hi there,
Consider I have a schema for my products as follows:
[{ "Name":"p1", "Price":10000, "Discount":0.5 }, { "Name":"p2", "Price":20000, "Discount":0.3 }]

I want to find products whose price after discount is less than 7000.
like the following predicate:
p=>p.Price*(1-p.Discount)<7000

How can I write this query in redissearch?

Thanks

@xujunhai
Copy link

xujunhai commented Nov 1, 2023

you can add a field , call DiscountPrice then you can do search.

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

2 participants