devemio / elasticsearch-eloquent Goto Github PK
View Code? Open in Web Editor NEW⚡️ Models like Eloquent for Elasticsearch.
Home Page: https://devemio.github.io/elasticsearch-eloquent
⚡️ Models like Eloquent for Elasticsearch.
Home Page: https://devemio.github.io/elasticsearch-eloquent
Need to write tests for basic features like:
Model::find($id)
Model::findOrFail($id)
Model::search($query)
Model::first($query)
Model::destroy($id)
and so on...
I'm using v5 for both and I see that this is using shift31 which if refer to the versioning here, v5.5 of shift31 is not released yet.
it does not support
please, fix it
I rewrote default User Model extends ElasticsearchModel:
`<?php
namespace App;
use Illuminate\Notifications\Notifiable;
//use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Foundation\Auth\Access\Authorizable;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use App\ElasticsearchModel as Model;
//use Laravel\Scout\Searchable;
class User extends Model implements
AuthenticatableContract,
AuthorizableContract,
CanResetPasswordContract
{
use Authenticatable, Authorizable, CanResetPassword, Notifiable;
protected static $_index = 'laravel';
protected static $_type = 'user';
// public $name;
// public $email;
// public $password;
// public $remember_token;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
`
When I ran App\User::search($query)->get();, I got this error:
Illuminate\Contracts\Container\BindingResolutionException with message 'Unresolvable dependency resolving [Parameter #0 [ $retries ]] in class Elasticsearch\Transport'
Fix orWhere()
method
Example: model type name format logstash-* without the use of aliases
I suggest using development https://github.com/ongr-io/ElasticsearchDSL
or make your like this https://github.com/sleimanx2/plastic#searching-model-content
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.