1
我已经将MySQL列索引到elasticsearch,并且此列有一些AR/EN/RO语言值。 如何使用unicode字符串在这些索引内搜索?如何在elasticsearch中使用Unicode字符进行搜索?
$hosts = ['localhost:9200'];
$client = \Elasticsearch\ClientBuilder::create()->setHosts($hosts)->build();
$body = '{ "query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"bool": {
"must": [
{"query": {"wildcard": {"text": {"value": "*'.$term.'*"}}}},
{"query": {"wildcard": {"group": {"value": "hotels_cities"}}}}
]
}
}
} }}';
$params['index'] = 'my_custom_index_name';
$params['type'] = 'translator_translations';
$params['body'] = $body;
$results = $client->search($params);
输出命中为零。
- 有一种叫做分析器的东西,但是没有关于如何在PHP中使用它的信息。