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

[ecommerceframework][elasticsearch] price sorting does not work with elasticsearch 6 #4916

markus-moser opened this issue Aug 30, 2019 · 0 comments


Copy link

commented Aug 30, 2019

code in loadWithoutPriceFilterWithPriceSorting() needs to look something like this (at least when elasticsearch 6 is used):

        unset($params['body']['sort']);     // don't send the sort parameter, because it doesn't exist with offline sorting
        $params['body']['size'] = 10000;    // won't work with more than 10000 items in the result (elasticsearch limit)
        $params['body']['from'] = 0;
        $params['body']['_source'] = ['system.priceSystemName'];

        $result = $this->sendRequest($params);
        $objectRaws = [];
        if ($result['hits']) {
            $this->totalCount = $result['hits']['total'];
            foreach ($result['hits']['hits'] as $hit) {
                $objectRaws[] = ['id' => $hit['_id'], 'priceSystemName' => $hit['_source']['system']['priceSystemName']];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.