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

Set upper interval as included in product count. #381

Closed

Conversation

romainruaud
Copy link
Collaborator

This is a fix for #376

@romainruaud
Copy link
Collaborator Author

Seems that you were right.

Something is weird here :

Product A is 68$
Product B is 69$
Product C is 69$
Product D is 69,10$

When building the Slider, the intervals values are given as this :

{"value":68,"count":1}
{"value":69,"count":3}

On the slider if I choose "67-69" : it show 4 products, meaning that the product D is included. So my PR is OK here. Without this PR the slider shows 1 product only.

BUT, if I submit the page, I only see products A B and C. Because the query sent to ES is :

"query":{"range":{"price.price":{"gte":"67","lte":"69"}}}

Which cannot match a product having a price of 69.10$

So I think this PR should not be merged as is, but rather be reworked a little to cover all cases.

If I set a product to 69.10$ and select eg 67$-69$

@afoucret
Copy link
Contributor

As you have said this PR need to be reworked.
I close for being inactive since a while.

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

Successfully merging this pull request may close these issues.

2 participants