-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't create index #214
Comments
Did you manage to get around this please ? I m facing the same problem. |
Same problem here. @timgws my
using tinker:
|
I created my index manually on elasticsearch My model : dont forget getTypeName() STEP 1
STEP 2
STEP 3
this is how I managed to get around the issue |
Here is my solution: https://dev.to/dendihandian/elasticsearch-eloquent-integration-in-laravel-43kp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Laravel Framework 6.7.0
elasticquent/elasticquent: dev-master
Hi,
every time i try to create an index i get this error :
Elasticsearch/Common/Exceptions/BadRequest400Exception with message '{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [articles : {_source={enabled=true}, properties={title={analyzer=standard, type=string}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [articles : {_source={enabled=true}, properties={title={analyzer=standard, type=string}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [articles : {_source={enabled=true}, properties={title={analyzer=standard, type=string}}}]"}},"status":400}'
i know this is because of my $mappingProperties, because when I remove it, the index is created well but with all the columns of my model => what I don't want. I would like to specify the fields and type them
My Aticles.php
`<?php
namespace App;
use Elasticquent\ElasticquentTrait;
use Illuminate\Database\Eloquent\Model;
class Article extends Model
{
use ElasticquentTrait;
protected $fillable = ['title', 'body', 'tags'];
protected $mappingProperties = array(
'title' => array(
'type' => 'string',
'analyzer' => 'standard'
)
);
}`
Can you help me ? thanks you so much
The text was updated successfully, but these errors were encountered: