Closed stonor closed 10 years ago
In case anyone else needs this, I ended up adding my code directly in the _map method while hoping for a filter:
foreach(Config::types() as $type){ $type = $index->getType($type);
$mapping = new \Elastica\Type\Mapping($type);
$boost = array (
'name' => 'search_weight',
'null_value' => 1.0
);
$mapping->setParam('_boost', $boost);
$mapping->send();
}
this has been addressed in the 2.2 branch
It could be great with a indexer filter that allows to manipulate the full mapping object before it is sent to Elasticsearch (in the _map method).
My usecase is that I need to add the _boost field to the mapping object and _boost lives outside the properties.