- Fix search case
This commit is contained in:
parent
bad1067b32
commit
e38debca7d
2 changed files with 25 additions and 4 deletions
|
|
@ -347,7 +347,6 @@ class MediaController extends Controller
|
|||
break;
|
||||
}
|
||||
}else if (strpos($search, '+') !== false){
|
||||
$search = strtolower(trim($filters->search->value));
|
||||
$tmpSearch = explode('+', $search);
|
||||
|
||||
$mustLib = [];
|
||||
|
|
|
|||
|
|
@ -51,19 +51,30 @@ class Media extends Model
|
|||
],
|
||||
'tokenizer' => 'whitespace',
|
||||
'filter' => [
|
||||
'word_delimiter'
|
||||
'lowercase',
|
||||
'word_delimiter',
|
||||
],
|
||||
],
|
||||
],
|
||||
'normalizer' => [
|
||||
'my_normalizer' => [
|
||||
'type' => 'custom',
|
||||
'char_filter' => [],
|
||||
'filter' => [
|
||||
'lowercase'
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
];
|
||||
protected $mappingProperties = array(
|
||||
'libelle' => array(
|
||||
'type' => 'text',
|
||||
'analyzer' => 'standard',
|
||||
'analyzer' => 'default',
|
||||
'fields' => array(
|
||||
'keyword' => array(
|
||||
'type' => 'keyword'
|
||||
'type' => 'keyword',
|
||||
'normalizer' => 'my_normalizer'
|
||||
)
|
||||
),
|
||||
'fielddata' => true
|
||||
|
|
@ -87,6 +98,17 @@ class Media extends Model
|
|||
'articles.noArt' => array(
|
||||
'type' => 'text',
|
||||
'analyzer' => 'standard'
|
||||
),
|
||||
'articles.libCcial' => array(
|
||||
'type' => 'text',
|
||||
'analyzer' => 'default',
|
||||
'fields' => array(
|
||||
'keyword' => array(
|
||||
'type' => 'keyword',
|
||||
'normalizer' => 'my_normalizer'
|
||||
)
|
||||
),
|
||||
'fielddata' => true
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue