-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
Alternatively to the mapping file, we could keep the mapping definition inside the model.
I'd suggest a syntax like this:
public function elasticMapping()
{
return array(
'id' => array('type' => 'integer'),
'name' => array('type' => 'string', 'index'=>'not_analyzed'),
...
);
}
Then ./yiic elastic map --model=<model> would use the data above to find the right mapping.
Not sure, if we should also automate this for the regular auto-indexing on save(). This would require a check on every save operation, whether the mapping exists. Probably a bit too extreme.
Reactions are currently unavailable