Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiisoft/yii2-elasticsearch
Yii 2 Elasticsearch extension
https://github.com/yiisoft/yii2-elasticsearch
elasticsearch hacktoberfest yii yii2
Last synced: 29 days ago
JSON representation
Yii 2 Elasticsearch extension
- Host: GitHub
- URL: https://github.com/yiisoft/yii2-elasticsearch
- Owner: yiisoft
- License: bsd-3-clause
- Created: 2013-11-26T00:31:21.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-09-29T16:48:40.000Z (about 1 year ago)
- Last Synced: 2024-04-15T07:19:49.400Z (7 months ago)
- Topics: elasticsearch, hacktoberfest, yii, yii2
- Language: PHP
- Homepage: http://www.yiiframework.com
- Size: 10.1 MB
- Stars: 429
- Watchers: 49
- Forks: 250
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
Elasticsearch Query and ActiveRecord for Yii 2
This extension provides the [Elasticsearch](https://www.elastic.co/products/elasticsearch) integration for the [Yii framework 2.0](https://www.yiiframework.com).
It includes basic querying/search support and also implements the `ActiveRecord` pattern that allows you to store active
records in Elasticsearch.For license information check the [LICENSE](LICENSE.md)-file.
Documentation is at [docs/guide/README.md](docs/guide/README.md).
[![Latest Stable Version](https://poser.pugx.org/yiisoft/yii2-elasticsearch/v/stable.png)](https://packagist.org/packages/yiisoft/yii2-elasticsearch)
[![Total Downloads](https://poser.pugx.org/yiisoft/yii2-elasticsearch/downloads.png)](https://packagist.org/packages/yiisoft/yii2-elasticsearch)
[![Build Status](https://travis-ci.com/yiisoft/yii2-elasticsearch.svg?branch=master)](https://travis-ci.com/yiisoft/yii2-elasticsearch)
[![codecov](https://codecov.io/gh/yiisoft/yii2-elasticsearch/graph/badge.svg?token=oi71bPc1SU)](https://codecov.io/gh/yiisoft/yii2-elasticsearch)Requirements
------------- PHP 7.3 or higher.
Depending on the version of Elasticsearch you are using you need a different version of this extension.
- For Elasticsearch 1.6.0 to 1.7.6 use extension version 2.0.x
- For Elasticsearch 5.x or above use extension version 2.1.xInstallation
------------The preferred way to install this extension is through [composer](https://getcomposer.org/download/):
```
composer require --prefer-dist yiisoft/yii2-elasticsearch:"~2.1.0"
```Configuration
-------------To use this extension, you have to configure the Connection class in your application configuration:
```php
return [
//....
'components' => [
'elasticsearch' => [
'class' => 'yii\elasticsearch\Connection',
'nodes' => [
['http_address' => '127.0.0.1:9200'],
// configure more hosts if you have a cluster
],
'dslVersion' => 7, // default is 5
],
]
];
```