in case of nested extensible structures the Length Indicator is already added due to the requirements IP_SO_1324 and IP_SO_1338.
时间: 2024-04-23 17:25:27 浏览: 14
如果存在嵌套的可扩展结构,则由于 IP_SO_1324 和 IP_SO_1338 的要求,长度指示器已经被添加。这句话的意思是,在存在嵌套的可扩展结构的情况下,由于 IP_SO_1324 和 IP_SO_1338 的要求,长度指示器已经被添加到序列化数据中了。这些要求规定了在可扩展结构中使用长度指示器的规则,以便能够正确地解析和处理这些结构。因此,在序列化嵌套的可扩展结构时,必须遵守这些要求,确保长度指示器已经被正确添加,以便在反序列化时能够正确地解析数据。
相关问题
The mapping definition cannot be nested under a type [_doc] unless include_type_name is set to true.
This error message typically occurs when trying to create a mapping for Elasticsearch 7.x or later, which requires the use of the `_doc` type instead of explicit types like `tweet` or `user`. To resolve this error, you can either set `include_type_name` to `true` in your mapping definition, or remove any references to explicit types and use `_doc` as the default type.
For example, if you were previously using a mapping like this:
```
PUT my_index
{
"mappings": {
"tweet": {
"properties": {
"message": {
"type": "text"
}
}
}
}
}
```
You would need to update it to use `_doc` instead:
```
PUT my_index
{
"mappings": {
"_doc": {
"properties": {
"message": {
"type": "text"
}
}
}
}
}
```
Alternatively, you could add `include_type_name: true` to your mapping definition:
```
PUT my_index
{
"mappings": {
"include_type_name": true,
"tweet": {
"properties": {
"message": {
"type": "text"
}
}
}
}
}
```
[nested_path] has been deprecated in favor of the [nested] parameter
这个警告信息是 Elasticsearch 给出的,意思是在查询中使用了已经被废弃的 [nested_path] 参数,建议使用 [nested] 参数替代。这是因为 Elasticsearch 7.x 版本中废弃了 [nested_path] 参数,取而代之的是 [nested] 参数,用于指定嵌套对象的查询。
举个例子,在查询中如果使用了 [nested_path] 参数,可以将其替换为 [nested] 参数,如下所示:
```json
{
"query": {
"nested": {
"path": "comments",
"query": {
"match": {
"comments.comment_text": "good"
}
}
}
}
}
```
上述查询使用了 [nested] 参数来查询嵌套对象,其中 "path": "comments" 指定了嵌套对象的路径,"query" 则是嵌套查询中的查询条件。
注意:在 Elasticsearch 7.x 版本中使用 [nested] 参数时需要指定一个内部的 [path] 参数,它指定了嵌套对象的路径。