Coder Social home page Coder Social logo

cpp-elasticsearch's Introduction

cpp-elasticsearch

C++ Client for Elasticsearch

cpp-elasticsearch is a small C++ API to elasticsearch, it aims at becomming the official one.

For this purpose, contributors must respect the following rules:

Once the required features will be added, new features will come like:

  • Load balancing
  • Connection pooling
  • Library package
  • Performance monitoring

A documentation is stil to come as well as a "get started" page and continous intragration project with Travis.

Get Source and Build

git clone https://github.com/QHedgeTech/cpp-elasticsearch.git
cd cpp-elasticsearch

#build example getstarted
scons project=getstarted mode=debug

#start example getstarted
example/bin/getstarted-debug-gnu

#clean example
scons -c project=getstarted


For debug builds, use "scons mode=debug"

Warning

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

Dependencies

The current version works on Linux/MacOS platform and is POSIX compliant without any dependency. The code may still be hacked to be used on other platform or with third party tools: any JSON parser, or libcurl for the connection for instance.

The JSON parser and the HTTP connection classes are not the purpose of this project. However, they are provided so this project can work as a stand-alone tool. They must be bug free sufficient (if not optimal) for the elasticsearch client.

cpp-elasticsearch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpp-elasticsearch's Issues

write() throws -1

Exception caught while reading socket - Bad file descriptor
how to solve this?

example/bin/getstarted-debug-gnu throws exception "search failed"

Official name is: localhost, IP addresses: 127.0.0.1 127.0.0.1 , session keep alive connection.
Index failed.
0
test-index/7hao/_search -d {"query":{"match_all":{}}}
result: {"status":200}
Exception in src/elasticsearch/elasticsearch.cpp l. 265 ->
Search failed.
terminate called after throwing an instance of 'Exception'

I tried to search:

curl http://localhost:9200/test-index/7hao/_search
This index exists and has "7hao" type documents.

ElasticSearch 2.3

the repository hasn't been updated since just after version 2.1. Will there be compatibility issues with version 2.3?

[Exception] example/bin/getstarted-debug-gnu

when I run example/bin/getstarted-debug-gnu, the follow bugs apper:
[root@5b9dbaaa148a cpp-elasticsearch-master]# example/bin/getstarted-debug-gnu
Official name is: localhost, IP addresses: 127.0.0.1 127.0.0.1 , session keep alive connection.
Couldn't connect, connection refused.
Exception caught while reading socket - Connection refused.
Exception in src/http/http.cpp l. 180 ->
error set by getsockopt.
get(0) failed in ElasticSearch::isActive(). Exception caught: error set by getsockopt.
Exception in src/elasticsearch/elasticsearch.cpp l. 14 ->
Cannot create engine, database is not active.
terminate called after throwing an instance of 'Exception'
Aborted (core dumped)

If you know the reason, please help me!
TKS!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.