dimanche 3 juillet 2016

how to hide a field in elastiquent

I have this in mapping properties

'extra_info' => [
            'type' => 'object',
 ],

and after that

return Model::searchByQuery($query, null, null, static::OFFSET, $offset, $sortQuery)->paginate(static::OFFSET);

I get this error: json_decode() expects parameter 1 to be string, array given

ps. I was trying to make ajax request.

The thing is that I don't need this field, but if I set enabled=false, or index=no, or store=false(type=string) the index doesn't even generate AT ALL.

Any help? I'm stuck here (( how to not store this field?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire