Download the PHP package carterzhou/elasticsearch without Composer
On this page you can find all versions of the php package carterzhou/elasticsearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download carterzhou/elasticsearch
More information about carterzhou/elasticsearch
Files in carterzhou/elasticsearch
Package elasticsearch
Short Description A Laravel package provides fluent API to work with Elasticsearch
License MIT
Homepage https://github.com/carterzhou/elasticsearch
Informations about the package elasticsearch
Laravel fluent APIs to work with Elasticsearch
Installation
Via Composer
Usage
Firstly, create an instance of this class. Here we use dependency injection to let Laravel create and inject an instance for us.
- Doing simple search
Then we can use method to grab data from Elasticsearch. Notice that we can chain method to add filtering conditions (similar to Eloquent method).
- Search for all documents. You can also communicate with Elasticsearch multiple times to get documents if total of matching documents exceeds the size you set.
Notice that we use a loop here because a search will be performed at least once. You don't have to manually set "from" because the method will calculate and maintain properties including "from" under the hood.
Warning: you should not use method if total of matching documents is over 10000, because by default the result window is 10000 by using "from" to do query. In such case, please use method instead.
- Use scrolling
As stated above, do not use method to loop through large result sets because normally you are not allowed to do so. To address such need, you can use method like so
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
License
license. Please see the license file for more information.
All versions of elasticsearch with dependencies
nesbot/carbon Version ~1.34
ext-json Version *
ext-curl Version *