gpt4 book ai didi

couchbase - couchbase 中的 SubDoc 操作

转载 作者:行者123 更新时间:2023-12-03 06:49:30 24 4
gpt4 key购买 nike

我正在使用此代码从特定文档中获取子文档

 DocumentFragment<Lookup> result= bucket.async().lookupIn(docId).get(subDocId).execute().
toBlocking().singleOrDefault(null);

我不知道为什么,但是

result.rawContent(subDocId)

返回null,而

result.content(subDocId)

返回正确的值。

谁能告诉我是什么原因导致了这个问题?

最佳答案

添加includeRaw(true)就可以了

DocumentFragment<Lookup> result =  couchbaseBucket.async().lookupIn(docId).get(subDocId).includeRaw(true).execute().
toBlocking().singleOrDefault(null);

关于couchbase - couchbase 中的 SubDoc 操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51024977/

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