Closed krafas closed 6 years ago
@krafas Enter debug mode and check what query for Elastic is generated and if that looks correct. To be honest, I have never encountered such behavior, so some debugging is required. Check also the raw responses from Elastic to verify what it returns.
@psihius do you know how aggregations works? I'm totally new in ES and this all ongr
stuff :) Maybe some "deeper" filters should be set for priceRange
? It looks like, that filter priceRange
aggregates stats from all products, when search query is empty.
OK, the problem was that by default SyliusElasticSearchPlugin defines taxon filters as sylius_elastic_search.choice_nested
type, so no query
to ES is given. The only one filter which adds query
is search
, so I overwrited ongr_filter_manager
configuration and changed taxonSlug
to be match
type.
When searching by query,
minBounds
andmaxBounds
ofpriceRange
is returned valid. It looks like that only when searching by taxonSlug,priceRange.maxBounds
value is always max value from all products.I would like that
maxBounds
value would be the max value of current taxon (+ all children). Any ideas where to start digging?