All Projects → Mirocow → yii2-elasticsearch

Mirocow / yii2-elasticsearch

Licence: BSD-3-Clause license
Elasticsearch client based on official Elasticsearch PHP library

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to yii2-elasticsearch

yii2-sweet-submit
sweet sumit using sweetalert
Stars: ✭ 26 (+85.71%)
Mutual labels:  yii2, yii2-extension
background-translation-i18n
Based on the YII2 module to translate JSON formatted translation files on the web
Stars: ✭ 11 (-21.43%)
Mutual labels:  yii2, yii2-extension
yii2-newsletter
Module for saving user contacts from newsletter form to database
Stars: ✭ 17 (+21.43%)
Mutual labels:  yii2, yii2-extension
yii2-mailqueue
Yii2 mail queue component for yii2-swiftmailer.
Stars: ✭ 15 (+7.14%)
Mutual labels:  yii2, yii2-extension
yii2-pgsql
Improved PostgreSQL schemas for Yii2
Stars: ✭ 34 (+142.86%)
Mutual labels:  yii2, yii2-extension
yii2-translatable
Translatable behavior aggregates logic of linking translations to the primary model
Stars: ✭ 15 (+7.14%)
Mutual labels:  yii2, yii2-extension
yii2-rollbar
Rollbar for Yii2
Stars: ✭ 36 (+157.14%)
Mutual labels:  yii2, yii2-extension
install
basic script for project installation
Stars: ✭ 17 (+21.43%)
Mutual labels:  yii2, yii2-extension
yii2-array-query
Yii2 component that allows for searching/filtering the elements of an array.
Stars: ✭ 34 (+142.86%)
Mutual labels:  yii2, yii2-extension
behavior-trait
Allows handling events via inline declared methods, which can be added by traits
Stars: ✭ 18 (+28.57%)
Mutual labels:  yii2, yii2-extension
yii2-vote
Provides voting for any model 👍 👎
Stars: ✭ 70 (+400%)
Mutual labels:  yii2, yii2-extension
yii2-bankcard-info
银行卡卡号分析(Yii2扩展)
Stars: ✭ 15 (+7.14%)
Mutual labels:  yii2, yii2-extension
content
Content management system for Yii2
Stars: ✭ 54 (+285.71%)
Mutual labels:  yii2, yii2-extension
yii2-stat
Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)
Stars: ✭ 18 (+28.57%)
Mutual labels:  yii2, yii2-extension
yii2-lets-talk
With this extension you can open chat with someone in popular messengers using the link on your website.
Stars: ✭ 15 (+7.14%)
Mutual labels:  yii2, yii2-extension
ar-search
Provides unified search model for Yii ActiveRecord
Stars: ✭ 31 (+121.43%)
Mutual labels:  yii2, yii2-extension
Ar Softdelete
Soft delete behavior for ActiveRecord
Stars: ✭ 188 (+1242.86%)
Mutual labels:  yii2, yii2-extension
Yii2 Translate Manager
Translation Manager
Stars: ✭ 221 (+1478.57%)
Mutual labels:  yii2, yii2-extension
yii2-cashier
Yii2 Cashier provides an interface to Stripe's subscription billing services.
Stars: ✭ 43 (+207.14%)
Mutual labels:  yii2, yii2-extension
yii2-jwt-tools
An easy way to configure JWT authentication and validation on Yii Framework 2 Projects
Stars: ✭ 22 (+57.14%)
Mutual labels:  yii2, yii2-extension

Elasticsearch client for Yii2 framework based on official Elasticsearch PHP library

www.elasticsearch.com

Latest Stable Version Latest Unstable Version Total Downloads License Join the chat at https://gitter.im/Mirocow/yii2-elasticsearch FOSSA Status Maintainability

Docs are available in english and russian. Based on https://github.com/elastic/elasticsearch

Honey modules

Install

$ composer require --prefer-dist mirocow/yii2-elasticsearch

Elasticsearch 5.6.x

$ wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
$ sudo apt-get install apt-transport-https
$ echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
$ sudo apt-get update && sudo apt-get install elasticsearch
$ composer require --prefer-dist mirocow/yii2-elasticsearch

Configure

  • Create a class that implements the common\modules\elasticsearch\contracts\Index interface.
  • Add it to the module configuration in common/config/main.php
  • Start indexing
return [
    'modules' => [

        // elasticsearch
        common\modules\elasticsearch\Module::MODULE_NAME => [
          'class' => common\modules\elasticsearch\Module::class,
          'indexes' => [
            common\repositories\indexes\ProductsSearchIndex::class
          ]
        ],

    ],
    'bootstrap' => [
        mirocow\elasticsearch\Bootstrap::class,
    ]
];

Create index

Create empty index

$ php yii elasticsearch/index/create index_name

Fill index with all documents

$ php yii elasticsearch/index/populate index_name

Destroy an index and all its data

$ php yii elasticsearch/index/destroy index_name

Remove all existing indexes, re-create all indexes and re-index all documents for all indexes

$ php yii elasticsearch/index/rebuild

Debug

$ export PHP_IDE_CONFIG="serverName=www.site.loc" && export XDEBUG_CONFIG="remote_host=192.168.1.6 idekey=xdebug" && php7.0 ./yii elasticsearch/index/create products_search

Query

<?php
        /** @var QueryBuilder $query */
        $query = new QueryBuilder;
        $query = $query
            ->add(QueryHelper::bool($filter, $must, $should, $must_not))
            ->aggregations($aggregations)
            ->withSource('attributes');

License

FOSSA Status

I use JetBrains products to develop yii2-elasticsearch !

www.jetbrains.com

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].