当我匹配"2019.*"时可以匹配到以2019开头的所有数据
elasticsearch 中被正则的字段为keyword,具体如下
regexpQuery("last_update_string_time", "2019*")));
当我以"2019-04.*"却匹配为空,期间也试过转义字符"2019\\-04.*"(本人ubuntu电脑转义为\\)elasticsearch 中被正则的字段为keyword,具体如下
"last_update_string_time": "2019-03-26 18:51:05"
3 个回复
solike8 - 95后,挨打男
赞同来自:
solike8 - 95后,挨打男
赞同来自:
The regexp query allows you to use regular expression term queries. See Regular expression syntax for details of the supported regular expression language. The "term queries" in that first sentence means that Elasticsearch will apply the regexp to the terms produced by the tokenizer for that field, and not to the original text of the field.
solike8 - 95后,挨打男
赞同来自: