Skip to content

Commit

Permalink
Support search_analyzer (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrault authored and saimaz committed Jan 23, 2017
1 parent 2b7e664 commit 9253daa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Mapping/DocumentParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,12 +442,18 @@ private function getAnalyzers(\ReflectionClass $reflectionClass)
if (isset($type->options['analyzer'])) {
$analyzers[] = $type->options['analyzer'];
}
if (isset($type->options['search_analyzer'])) {
$analyzers[] = $type->options['search_analyzer'];
}

if (isset($type->options['fields'])) {
foreach ($type->options['fields'] as $field) {
if (isset($field['analyzer'])) {
$analyzers[] = $field['analyzer'];
}
if (isset($field['search_analyzer'])) {
$analyzers[] = $field['search_analyzer'];
}
}
}
}
Expand Down

0 comments on commit 9253daa

Please sign in to comment.