allow for adding custom analyzers to mapping definition#2282
allow for adding custom analyzers to mapping definition#2282gusdemayo wants to merge 1 commit intoSmile-SA:2.10.xfrom
Conversation
| return $this->config['custom_search_analyzers']; | ||
| } | ||
|
|
||
| return json_decode($this->config['custom_search_analyzers'], true); |
There was a problem hiding this comment.
I'm not a huge fan of having json_encoded data being set inside XML file, couldn't it be an XML array either ?
There was a problem hiding this comment.
By the way, I think the xsd schema should be updated with this new config node probably.
| /** | ||
| * {@inheritDoc} | ||
| */ | ||
| public function getCustomSearchAnalyzers() |
There was a problem hiding this comment.
I think we need some unit testing here, this file is already covered so any new method should also be.
| $weightedFields = array_merge($weightedFields, $this->addWeightedFields($analyzers, $canAddField, $field, $boost)); | ||
| } | ||
|
|
||
| return $weightedFields; |
There was a problem hiding this comment.
We need additional test cases in unit testing to deal with the fact that we can have custom_analyzers or not.
Actually the existing tests are not failing, which is good, but there is no clue about the expected result if the field is meant to have custom_analyzers
|
Hi @gusdemayo this looks promising, but considering modifying this part is "high risk" (it can break mapping, change behavior of fulltext search, etc...), we need some more deep testing to ensure everything is safe, so we'll need some time internally to give it a try. In the meantime, can you have a look to the requested changes I added in my review ? Best regards |
Allow for adding analyzers to field mappings in following format