icu_collection
时间: 2023-08-26 15:06:47 浏览: 37
ICU Collection 是一个开源的 Unicode 库,它提供了一系列的 C/C++ 函数和工具,用于处理 Unicode 字符串和文本。ICU Collection 支持多种编码格式,包括 UTF-8、UTF-16 和 UTF-32。它还提供了许多有用的功能,如文本分割、字符转换、日期和时间格式化等。ICU Collection 被广泛应用于跨平台的国际化应用程序开发中。
相关问题
where INPOOL_ICU_TIME !='0000-00-00 00:00:00' and OUT_ICU_TIME!='0000-00-00 00:00:00'
根据提供的引用内容,您遇到了一个关于日期时间字段值超出范围的错误。您想知道如何解决这个问题,并且想了解如何使用WHERE子句来过滤掉特定的日期时间值。
解决办法是使用NULLIF()函数将日期时间字段的值转换为NULL,然后将其插入表中。下面是一个示例代码:
```sql
insert into mytbl1 values(NULLIF('0000-00-00 00:00:00','0000-00-00 00:00:00')::timestamp);
```
这将把'0000-00-00 00:00:00'转换为NULL,并将其插入到mytbl1表中的日期时间字段中。
另外,如果您使用的是PostgreSQL数据库,并且日期时间字段的类型是timestamp,您可以尝试以下方法来避免错误:
```sql
create table mytbl1 (dte timestamp);
insert into mytbl1 values (now()); -- 成功插入一行数据
insert into mytbl1 values ('0000-00-00 00:00:00'); -- 报错:date/time field value out of range: "0000-00-00 00:00:00"
```
在上面的示例中,第一条插入语句成功插入了当前日期时间值,而第二条插入语句由于值超出范围而报错。
对于您的问题,如果您想过滤掉WHERE子句中特定的日期时间值,可以使用以下条件:
```sql
WHERE INPOOL_ICU_TIME != '0000-00-00 00:00:00' AND OUT_ICU_TIME != '0000-00-00 00:00:00'
```
这将过滤掉INPOOL_ICU_TIME和OUT_ICU_TIME字段值为'0000-00-00 00:00:00'的记录。
how to fix Elasticsearch exception [type=mapper_parsing_exception, reason=Failed to parse mapping [_doc]: no handler for type [icu_collation_keyword] declared on field [so
To fix the Elasticsearch exception of type `mapper_parsing_exception` with the reason "Failed to parse mapping [_doc]: no handler for type [icu_collation_keyword] declared on field [so]," you need to make sure that the ICU plugin is installed and enabled in Elasticsearch.
Here are the steps to follow:
1. Check if the ICU plugin is installed by running the following command in your Elasticsearch bin directory:
```
bin/elasticsearch-plugin list
```
If ICU is not listed, you can install it by running the following command:
```
bin/elasticsearch-plugin install analysis-icu
```
2. Once the ICU plugin is installed, you need to enable it by adding the following configuration to your Elasticsearch configuration file (`elasticsearch.yml`):
```
index.analysis.analyzer.default.type: "custom"
index.analysis.analyzer.default.tokenizer: "icu_tokenizer"
```
3. After making the changes, restart Elasticsearch for the changes to take effect.
Once Elasticsearch restarts, the `icu_collation_keyword` type should be recognized, and the exception should be resolved.