我是RavenDB的新手,到目前为止我很喜欢它.我有一个剩余的索引要为我的项目创建.
问题
我有数以千计的调查回复(即" Submissions"),每个提交都有一系列特定问题的答案(即" Answers"),每个答案都有一系列选择的选项(即" Values").
这是一个Submission基本上看起来像:
{
"SurveyId": 1,
"LocationId": 1,
"Answers": [
{
"QuestionId": 1,
"Values": [2,8,32],
"Comment": null
},
{
"QuestionId": 2,
"Values": [4],
"Comment": "Lorem ipsum"
},
...more answers...
]
}
Run Code Online (Sandbox Code Playgroud)
更多问题:我必须能够通过SurveyId,LocationId,QuestionId,Creation Date进行过滤.据我所知,这是在查询时完成的...我只需要确保转换结果中存在这些属性(或者是减少结果?还是两者都有?).如果我是对的,那么这不是一个问题.
所需结果
每个调查每个问题需要一个对象,给出每个选项的总和.希望它是自我解释的:
[
{
SurveyId: 1,
QuestionId: 1,
NumResponses: 976,
NumComments: 273,
Values: {
"1": 452, // option 1 selected 452 times
"2": 392, // option 2 selected 392 times
"4": 785 // option 4 selected 785 …Run Code Online (Sandbox Code Playgroud) 我已经在谷歌云的 3 节点集群上部署了 ravendb。但是它不能从浏览器访问。这是我遵循的程序和配置。你能帮我解决服务和部署问题吗?当我运行 get pods 和 get svc 命令时,pods 和服务正在运行,但无法从浏览器访问数据库。
程序如下:
I suggest you first run the setup wizard on your local dev machine and get the Let's Encrypt certificate. Just use 127.0.0.1:8080 as the IP, it's not important at the moment.
(Even better will be to get your own domain + certificate for production use)
You need to convert both the pfx file and the license.json file to base64, In c# for example:
Convert.ToBase64String(File.ReadAllBytes(@"C:\work\certs\cluster.server.certificate.iftah.pfx"))
Convert.ToBase64String(File.ReadAllBytes(@"C:\work\license.json"))
1. Create a …Run Code Online (Sandbox Code Playgroud) ravendb ravenhq kubernetes google-kubernetes-engine kubernetes-ingress