Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ api for Elastic search [closed]

From what I understand, elasticsearch doesn't provide C++ api with it. So, I'm assuming that I should use a library to send/receive http requests for indexing and searching. Any recommendations on the library that would suit elastic search needs? Thanks.

like image 929
new_sys_admin Avatar asked Nov 02 '12 21:11

new_sys_admin


People also ask

How do I reopen a closed index in Elasticsearch?

You can use the open index API to re-open closed indices. If the request targets a data stream, the request re-opens any of the stream's closed backing indices. A closed index is blocked for read/write operations and does not allow all operations that opened indices allow.

Does Elasticsearch use REST API?

One of the great things about Elasticsearch is its extensive REST API which allows you to integrate, manage and query the indexed data in countless different ways. Examples of using this API to integrate with Elasticsearch are abundant, spanning different companies and use cases.

What is a closed index in Elasticsearch?

A closed index has almost no overhead on the cluster (except for maintaining its metadata), and is blocked for read/write operations.


2 Answers

I just released one on github: https://github.com/QHedgeTech/cpp-elasticsearch.

There is one home made http client included but it can easily be plugged to libcurl. It's still minimal, hope to see you contribute so it'll match your needs too.

cpp-elasticsearch is a small C++ API to elasticsearch, it aims at becomming the official one. Documentation is still to come, as well as a "get started" page.

Actual version is minimal and has been developped for the needs of Q-Hedge Technologies. Features of C++11 are used in this code.

like image 72
William W. Avatar answered Oct 12 '22 01:10

William W.


Any networking library should work fine. Libcurl is probably the easiest/fastest to get running, since all you really need are simple HTTP requests (Get/Put/Post/Delete)

like image 35
Zach Avatar answered Oct 12 '22 00:10

Zach