Releases: pionl/laravel-lelastico
Releases · pionl/laravel-lelastico
v0.2.4
⛑ 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
v0.2.2
⛑ 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 useELASTICSEARCH_LOG_MEASUREMENT
env.log_debug
Debug logs every query data to a log (true in local environment). You can useELASTICSEARCH_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
0.2.0
0.1.9
0.1.8
🚀 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
🤘 delete bey query accepts options and returns query result from the Client (by @vitezslav-lindovsky )
0.1.6
⛑ Fix --only parameter (@vitezslav-lindovsky)
0.1.5
🚀 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