如何通过c++中的应用程序将数据插入solr
How do I insert data into solr through my application which is in c++
我想通过我的应用程序将数据插入solr,我也在使用弹性搜索来存储数据,将数据插入到弹性搜索中我正在使用以下请求,将我的数据包括在索引"16-03-2016-sslindex"中:
"POST http://192.168.0.164:9200/_bulk HTTP/1.1
Host: 192.168.0.164:9200
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;)
Pragma: no-cache
Content-Type: application/x-www-form-urlencoded
Content-Length: 196"
"{"index":{"_index": "16-03-2016-sslindex","_type":"session"}}
{"UniqueID":"2016-3-16-10-45-19-1-1","Time":"2016-3-16T10:45:19","SrcIp":"192.168.0.180","SrcPort":1123,"DstIp":"74.125.68.113","DstPort":443,"InterfaceID":"1","LocationID":2,"Size":0,"Snortname":"p_snort.log.123","Dummy1":"","Dummy2":0}"
我想以同样的方式使用solr。请求结构应该是什么,以便在solr中插入valye。
Solr支持用于插入/更新/搜索的HTTP协议
你必须点击Solr(再次通过套接字编程。)
在Java中
public void pumpData() {
// hit elastic cloud
// then hit solr
}
(仅供参考:Solrj是一个访问solr的java客户端。它使任务变得不那么容易。)
你在C++中也必须这样做。C++有"SolrCp"solr客户端-SolrCpp
Apache站点提到了相同的solr客户端
相关文章:
- 逐行读取文件,并将数据插入变量和数组中
- Qt & SqlLite 将数据插入数据库
- C++ - 将数据插入到地图循环的地图中
- SQLite C/C++ 接口:将数据插入表时内存增加
- C++将 X 向量数据插入到另一个向量
- 如何通过 C 变量将数据插入表中
- 将数据插入一些复杂的数据结构-C
- 将数据插入C 中的文本文件中
- 如何通过c++中的应用程序将数据插入solr
- 在Windows上将数据插入文件
- C++链表——如何将每个新数据插入尾部
- C++链表实现多数据插入
- 在c++中,将数据插入到文件中的特定位置而不进行覆盖
- C++内存从将数据插入链表中泄漏
- 将数据插入多维向量并进行排序
- WINAPI SQLite C无法正确地将数据插入数据库
- 参照同一矢量的数据插入矢量
- PostgreSQL字节二进制数据插入
- Cuda有效地将数据插入到未排序的填充数组中
- 使用 ADO 将原始文件数据插入访问表的 BLOB("OLE 对象")字段