forked from CommerceDataService/patent-process-and-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_schema.py
69 lines (58 loc) · 1.14 KB
/
update_schema.py
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
61
62
63
64
65
66
67
68
69
from s3_upload.solr import Solr
solr = Solr('http://52.90.109.169:8983', 'oadata_3_shard1_replica1')
longs = (
"appl_id",
)
doubles = (
"file_dt",
"effective_filing_dt",
"dn_nsrd_curr_loc_dt",
"app_status_dt",
"patent_issue_dt",
"abandon_dt",
"doc_date",
)
text = (
"invn_ttl_tx",
)
strings = (
"type",
"appid",
"ifwnumber",
"documentcode",
"documentsourceidentifier",
"partyidentifier",
"groupartunitnumber",
"inv_subj_matter_ty",
"appl_ty",
"dn_examiner_no",
"dn_dw_dn_gau_cd",
"dn_pto_art_class_no",
"dn_pto_art_subclass_no",
"confirm_no",
"dn_intppty_cust_no",
"atty_dkt_no",
"dn_nsrd_curr_loc_cd",
"app_status_no",
"wipo_pub_no",
"patent_no",
"disposal_type",
"se_in",
"pct_no",
"aia_in",
"continuity_type",
"frgn_priority_clm",
"usc_119_met",
"fig_qt",
"indp_claim_qt",
"efctv_claims_qt",
"staging_src_path",
)
for f in longs:
solr.add_field(f, 'tlongs')
for f in doubles:
solr.add_field(f, 'tdoubles')
for f in strings:
solr.add_field(f, 'string')
for f in text:
solr.add_field(f, 'text')