Download the PHP package krisanalfa/ductible without Composer
On this page you can find all versions of the php package krisanalfa/ductible. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download krisanalfa/ductible
More information about krisanalfa/ductible
Files in krisanalfa/ductible
Package ductible
Short Description Laravel and ElasticSearch in harmony.
License MIT
Informations about the package ductible
Ductible
Ductible is a Laravel package that deliver a mid-level Elastic Search client.
Installation
You can install ductible via composer cli:
Configuration
Register DuctibleServiceProvider
to your configuration:
Optional
Register Facade alias to your configuration:
Publishing Configuration
By default, you can use Ductible with zero configuration, assuming your Elasticsearch run in http://localhost:9200. If you want something different, you may publish Ductible configuration and make some changes from it:
Configuration Explained
You can read from inline docs there. It currently supports many aspect of Elasticsearch client configuration, such as:
host
(The most common configuration is telling the client about your cluster. read below to know how to configure multiple hosts.).retries
(When the client runs out of retries, it will throw the last exception that it received.).log
(Where to store your elasticsearch log.).handler
(Elasticsearch-PHP uses an interchangeable HTTP transport layer called RingPHP. You may customize your handler here.).pool
(The connection pool is an object inside the client that is responsible for maintaining the current list of nodes.).selector
(The connection pool manages the connections to your cluster.).serializer
(The response serializer.).client.ignores
(The library attempts to throw exceptions for common problems. These exceptions match the HTTP response code provided by Elasticsearch.)client.verbose
(If you require more information, you can tell the client to return a more verbose response.).
You can set multiple hosts by configuring in your env
file like so:
Usage
Basic
Ductible provides a low level client interaction, which you can explore as much as you want.
Indexing a Document
Getting Document Index
Update Document Index
Delete Document Index
Searching
Bulk Indexing Documents
Using Eloquent
To Be Defined
ToDo
- [ ] Separate indexing operation based on eloquent model in Ductible main class
- [ ] More unit testing
All versions of ductible with dependencies
elasticsearch/elasticsearch Version ~2.2
doctrine/dbal Version ^2.5