Smile-SA / elasticsuite

Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
https://elasticsuite.io
Open Software License 3.0
761 stars 341 forks source link

Filters having decimal values shows Min and Max value as Integer #188

Open sumitgithub opened 8 years ago

sumitgithub commented 8 years ago

Filter type of decimal shows min and max value as integer but I have to show them as Float. Kindly suggest

afoucret commented 7 years ago

Hi @sumitgithub ,

If you look carefully at the implementation, it is almost impossible to have such a feature implemented because of limitations of the histogram aggregation in ES on which the facet implementation rely.

The histogram aggregation supports only integer intervals and does not give any statistical detail on the field.

We could append a statistical facet to do such things but it would hurt performances (computing an additional aggregation when loading the collection) for something that is not a core feature.

As it appears to be a very specific need, I would say we won't fix this one unless there is no more votes from the community.

sumitgithub commented 7 years ago

Hi Aurélien,

What if we want this for a particular facet only? Means aggregation for other facet will be in unit separation and for that particular facet it will be in decimal(0.1).

On Wed, Nov 9, 2016 at 2:50 PM, Aurélien FOUCRET notifications@github.com wrote:

Hi @sumitgithub https://github.com/sumitgithub ,

If you look carefully at the implementation, it is almost impossible to have such a feature implemented because of limitations of the histogram aggregation in ES on which the facet implementation rely.

The histogram aggregation supports only integer intervals and does not give any statistical detail on the field.

We could append a statistical facet to do such things but it would hurt performances (computing an additional aggregation when loading the collection) for something that is not a core feature.

As it appears to be a very specific need, I would say we won't fix this one unless there is no more votes from the community.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Smile-SA/elasticsuite/issues/188#issuecomment-259367738, or mute the thread https://github.com/notifications/unsubscribe-auth/AF6PXtL9HnZL14whtymKmNjzX5hGN9rgks5q8ZBYgaJpZM4KqO6H .

afoucret commented 7 years ago

As explained, the histogram facet does not support decimal intervals unless we use ES 5.x. We have to work on the compatibility and on a problem with Magento EE (which ship a dependance to the ES 2.x PHP client).

I think there is no better response we can give to you at least at this time.

romainruaud commented 5 years ago

@sumitgithub I know it's a pretty old issue but since everybody should be using at least Elasticsearch 5 for now, can you test it again ?

Regards