作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这个 JSON 是否合法地向 SOLR 添加文档?
{
"add": [{"doc": {"id" : "TestDoc1", "title" : "test1"} },
{"doc": {"id" : "TestDoc2", "title" : "another test"} },
{"doc": {"id" : "TestDoc1", "title" : "test1"} },
{"doc": {"id" : "TestDoc2", "title" : "another test"}}]
}
我正在使用 SOLR 3.4 并从 PHP 内部使用 CURL 提交。如果这不正确,我应该在日志中看到什么?
编辑:这个问题被错误地理解为好像我在上面的结构中存在错误(我确实缺少括号),但这不是目的。这个问题是一个更普遍的问题,我编辑了标题以反射(reflect)这一点。
最佳答案
您在末尾缺少一个}
,不是吗?
{
"add": [{"doc": {"id" : "TestDoc1", "title" : "test1"} },
{"doc": {"id" : "TestDoc2", "title" : "another test"} },
{"doc": {"id" : "TestDoc1", "title" : "test1"} },
{"doc": {"id" : "TestDoc2", "title" : "another test"} }]
}
关于java - 我可以用来向 SOLR 提交多条记录的最优化/最短的 JSON 结构是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7560552/
假设我有一个显示用户信息(主要是姓名和年龄)的网站,我想知道从数据库中获取所有记录的最优化和最有效的方法是什么。 虽然我刚刚开始学习 DBMS,但这是我的第一段代码 connect_error
在我的应用程序中,我需要创建一个带有 1px 彩色边框和圆角半径的按钮。宽度可能不同。 当然我会创建一个 UIButton 设置它的 layer.cornerRadius 和 layer.border
我是一名优秀的程序员,十分优秀!