change ES index prefixes to Peerplays-specific
This commit is contained in:
parent
583c6cc552
commit
65611df97d
3 changed files with 11 additions and 11 deletions
|
|
@ -56,7 +56,7 @@ class elasticsearch_plugin_impl
|
|||
uint32_t _elasticsearch_bulk_sync = 100;
|
||||
bool _elasticsearch_visitor = false;
|
||||
std::string _elasticsearch_basic_auth = "";
|
||||
std::string _elasticsearch_index_prefix = "bitshares-";
|
||||
std::string _elasticsearch_index_prefix = "peerplays-";
|
||||
bool _elasticsearch_operation_object = false;
|
||||
uint32_t _elasticsearch_start_es_after_block = 0;
|
||||
bool _elasticsearch_operation_string = true;
|
||||
|
|
@ -413,7 +413,7 @@ void elasticsearch_plugin::plugin_set_program_options(
|
|||
("elasticsearch-basic-auth", boost::program_options::value<std::string>(),
|
||||
"Pass basic auth to elasticsearch database('')")
|
||||
("elasticsearch-index-prefix", boost::program_options::value<std::string>(),
|
||||
"Add a prefix to the index(bitshares-)")
|
||||
"Add a prefix to the index(peerplays-)")
|
||||
("elasticsearch-operation-object", boost::program_options::value<bool>(),
|
||||
"Save operation as object(false)")
|
||||
("elasticsearch-start-es-after-block", boost::program_options::value<uint32_t>(),
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class es_objects_plugin_impl
|
|||
bool _es_objects_balances = true;
|
||||
bool _es_objects_limit_orders = true;
|
||||
bool _es_objects_asset_bitasset = true;
|
||||
std::string _es_objects_index_prefix = "objects-";
|
||||
std::string _es_objects_index_prefix = "ppobjects-";
|
||||
uint32_t _es_objects_start_es_after_block = 0;
|
||||
CURL *curl; // curl handler
|
||||
vector <std::string> bulk;
|
||||
|
|
@ -308,7 +308,7 @@ void es_objects_plugin::plugin_set_program_options(
|
|||
("es-objects-balances", boost::program_options::value<bool>(), "Store balances objects(true)")
|
||||
("es-objects-limit-orders", boost::program_options::value<bool>(), "Store limit order objects(true)")
|
||||
("es-objects-asset-bitasset", boost::program_options::value<bool>(), "Store feed data(true)")
|
||||
("es-objects-index-prefix", boost::program_options::value<std::string>(), "Add a prefix to the index(objects-)")
|
||||
("es-objects-index-prefix", boost::program_options::value<std::string>(), "Add a prefix to the index(ppobjects-)")
|
||||
("es-objects-keep-only-current", boost::program_options::value<bool>(), "Keep only current state of the objects(true)")
|
||||
("es-objects-start-es-after-block", boost::program_options::value<uint32_t>(), "Start doing ES job after block(0)")
|
||||
;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE(elasticsearch_account_history) {
|
|||
graphene::utilities::ES es;
|
||||
es.curl = curl;
|
||||
es.elasticsearch_url = "http://localhost:9200/";
|
||||
es.index_prefix = "bitshares-";
|
||||
es.index_prefix = "peerplays-";
|
||||
//es.auth = "elastic:changeme";
|
||||
|
||||
// delete all first
|
||||
|
|
@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE(elasticsearch_account_history) {
|
|||
fc::usleep(fc::milliseconds(1000));
|
||||
|
||||
// for later use
|
||||
//int asset_create_op_id = operation::tag<asset_create_operation>::value;
|
||||
//int asset_crobjeate_op_id = operation::tag<asset_create_operation>::value;
|
||||
//int account_create_op_id = operation::tag<account_create_operation>::value;
|
||||
|
||||
string query = "{ \"query\" : { \"bool\" : { \"must\" : [{\"match_all\": {}}] } } }";
|
||||
|
|
@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(elasticsearch_account_history) {
|
|||
|
||||
// check the visitor data
|
||||
auto block_date = db.head_block_time();
|
||||
std::string index_name = graphene::utilities::generateIndexName(block_date, "bitshares-");
|
||||
std::string index_name = graphene::utilities::generateIndexName(block_date, "peerplays-");
|
||||
|
||||
es.endpoint = index_name + "/data/2.9.12"; // we know last op is a transfer of amount 300
|
||||
res = graphene::utilities::getEndPoint(es);
|
||||
|
|
@ -138,7 +138,7 @@ BOOST_AUTO_TEST_CASE(elasticsearch_objects) {
|
|||
graphene::utilities::ES es;
|
||||
es.curl = curl;
|
||||
es.elasticsearch_url = "http://localhost:9200/";
|
||||
es.index_prefix = "objects-";
|
||||
es.index_prefix = "ppobjects-";
|
||||
//es.auth = "elastic:changeme";
|
||||
|
||||
// delete all first
|
||||
|
|
@ -193,10 +193,10 @@ BOOST_AUTO_TEST_CASE(elasticsearch_suite) {
|
|||
graphene::utilities::ES es;
|
||||
es.curl = curl;
|
||||
es.elasticsearch_url = "http://localhost:9200/";
|
||||
es.index_prefix = "bitshares-";
|
||||
es.index_prefix = "peerplays-";
|
||||
auto delete_account_history = graphene::utilities::deleteAll(es);
|
||||
fc::usleep(fc::milliseconds(1000));
|
||||
es.index_prefix = "objects-";
|
||||
es.index_prefix = "ppobjects-";
|
||||
auto delete_objects = graphene::utilities::deleteAll(es);
|
||||
fc::usleep(fc::milliseconds(1000));
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ BOOST_AUTO_TEST_CASE(elasticsearch_history_api) {
|
|||
graphene::utilities::ES es;
|
||||
es.curl = curl;
|
||||
es.elasticsearch_url = "http://localhost:9200/";
|
||||
es.index_prefix = "bitshares-";
|
||||
es.index_prefix = "peerplays-";
|
||||
|
||||
auto delete_account_history = graphene::utilities::deleteAll(es);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue