forked from blackbaud/elasticsearch-admin-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreindex-new.sh
executable file
·61 lines (56 loc) · 1.46 KB
/
reindex-new.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/bash
#
# Unfinished script to reindex data between indexes.
#
source "./indexUtil.sh"
# list of fields whose data we want to copy
documentFieldList=(
"id"
"tenant_id"
"cons_id"
"cons_name.first"
"cons_name.middle"
"cons_name.last"
"email_opt_in_status"
"email.address"
"email.type"
"email.do_not_email"
"email.is_active"
"address.address_lines"
"address.locality"
"address.sub_administrative_area"
"address.administrative_area"
"address.postal_code"
"address.country"
"address.do_not_mail"
"address.preferred"
"address.type"
"type"
"active"
"membership.level_id"
"membership.status"
"membership.start_date"
"membership.expiration_date"
"cong_dist_id"
"state_senate_dist_id"
"state_house_dist_id"
"home_municipality"
"municipal_id"
"municipal_dist_id"
"donor_status"
"email_status"
"sustained_giving.status"
"sustained_giving.monthly_amount"
"sustained_giving.start_date"
"sustained_giving.planned_end_date"
"last_transaction_amount"
"transaction_totals.prev_year_total_year"
"transaction_totals.previous_year_total"
"transaction_totals.current_year_to_date_total"
"transaction_totals.lifetime_total"
"creation_date"
)
documentFields=$(sed -E 's/^| /&-/g' <<<"$documentFieldList")
echo $documentFields
buildElasticSearchReindexUrl elasticSearchUrl $environment
echo "Elastic search url: $elasticSearchUrl"