gpt4 book ai didi

performance - 如何在Elasticsearch和Python中初始化标签数组列表

转载 作者:行者123 更新时间:2023-12-02 22:34:10 27 4
gpt4 key购买 nike

我想在下面初始化一个空数组。我怎样才能做到这一点 ?

"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "customers",
"_type": "customer",
"_id": "QOTzXMUcrnbsYyFKeouHnjlkjQB3",
"_score": 1,
"_source": {
"uid": "QOTzXMUcrnbsYyFKeouHnjlkjQB3",
"email": "george@gmail.com",
"favorites": [], < ---- this is the problem
"history": [],
"settings": {},
"purchases ": [],
"created": 1507892081201,
"updated": 1507892081201
}
}
]
}

最佳答案

不知道我的问题是否正确,但是如前所述,如果要避免空数组中的[]值,您可以简单地使用null值,以便搜索和索引这些null值。请引用null values elasticsearch的官方文档。

关于performance - 如何在Elasticsearch和Python中初始化标签数组列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64400454/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com