Skip to content

Releases: pionl/laravel-lelastico

v0.2.4

17 Mar 09:21
dc3fdc7
Compare
Choose a tag to compare

⛑ Fix inner hit building and return self while using collapse

This can be now used.

$this->query->collapse(
                (new Collapse(
                    $this->options->groupByTypology
                        ? PriceTermsIndex::TYPE_ID
                        : PriceTermsIndex::OBJECT_ID
                ))
                ->addInnerHit(
                    (new InnerHit(
                        self::KEY_INNER_HITS_NAME,
                        10
                    ))
                    ->collapse(PriceTermsIndex::TYPE_TO_BOARD)
                )
            );

v0.2.3

23 Feb 12:26
81eb760
Compare
Choose a tag to compare

⛑ Fix incorrect pagination for cardinality results by @pionl

v0.2.2

11 Nov 14:22
ddc67e8
Compare
Choose a tag to compare

⛑ Default sort fix + log improvements

Ensure that results are sorted by _id (could be breaking change).

By default we are sorting by _id after any HasSorting logic to ensure that pagination is correct.

You can turn this feature by using $builder->setSortById(false);

Improved logging (new config)

  • log_measurement Logs every query to log (default false). You can use ELASTICSEARCH_LOG_MEASUREMENT env.
  • log_debug Debug logs every query data to a log (true in local environment). You can use ELASTICSEARCH_LOG_DEBUG env.
  • service Enables to change available indices (implement IndicesServiceContract or extend IndicesService)
  • prefix Used prefix for index names - uses APP_NAME and replace '-' to '_', converts name to slug variant.
  • hosts A list of IPS for your elastic search - https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/configuration.html. Use ; separator. Default localhost:9200.

By @pionl

0.2.1

11 Feb 11:10
Compare
Choose a tag to compare

🚀 Add ability to send sort via request by @erikpach

  • Send sort in request sort[]=goals:asc&sort[]=minutes:desc
  • Use HasSorting in your Builder

🎉 Add refresh option to BulkWrite

0.2.0

31 Dec 08:35
289b20b
Compare
Choose a tag to compare

Breaking change

If you are extending __construct, you need to pass request/config parameters.

Change-log

⛑ fix request path building (page parameter twice
⛽️ Use container depedency

0.1.9

29 Oct 16:48
d0de29b
Compare
Choose a tag to compare

Add support for operator in match / multi match

0.1.8

04 Sep 12:37
a75db5a
Compare
Choose a tag to compare

🚀 Add ability to change available indices by implementing custom IndicesService (extend existing implementation or use IndicesServiceContract.

1. Edit lelastico.php config

'service' => MyOwnIndicesService::class,

2. Change the implementation

namespace App\ElasticSearch;

use App\Storage\ConfigStorageContract;
use App\Storage\ISConfigStorage;
use Illuminate\Contracts\Config\Repository;
use Lelastico\IndicesService;

class ISIndicesService extends IndicesService
{
    private ISConfigStorage $configStorage;

    public function __construct(Repository $configRepository, ISConfigStorage $configStorage)
    {
        parent::__construct($configRepository);
        $this->configStorage = $configStorage;
    }

    public function getAvailableIndices(): array
    {
        $groupedIndices = parent::getAvailableIndices();

        $baseIndices = $groupedIndices['base'];

        if ($this->configStorage->getDataSource() === ConfigStorageContract::IS2_DATA_STORE) {
            return array_merge($baseIndices, $groupedIndices['is2']);
        }

        return $baseIndices;
    }
}

0.1.7

01 Jul 08:23
Compare
Choose a tag to compare

🤘 delete bey query accepts options and returns query result from the Client (by @vitezslav-lindovsky )

0.1.6

15 Jun 15:28
Compare
Choose a tag to compare

⛑ Fix --only parameter (@vitezslav-lindovsky)

0.1.5

23 May 13:53
c5ca883
Compare
Choose a tag to compare

🚀 Add ability to pass custom options to create / update documents as third parameter.

$options['wait_for_active_shards'] = (string) Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
$options['refresh'] = (enum) If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes. (Options = true,false,wait_for)
$options['routing'] = (string) Specific routing value
$options['timeout'] = (time) Explicit operation timeout
$options['version'] = (number) Explicit version number for concurrency control
$options['version_type'] = (enum) Specific version type (Options = internal,external,external_gte)
$options['pipeline'] = (string) The pipeline id to preprocess incoming documents with