Commit 3e975747 by 高宇强

gyq

parent 526a5022
...@@ -1302,8 +1302,11 @@ auther:sy ...@@ -1302,8 +1302,11 @@ auther:sy
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits) { for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
...@@ -1339,24 +1342,37 @@ auther:sy ...@@ -1339,24 +1342,37 @@ auther:sy
} }
}, },
"_source": [ "_source": [
"filing_name",
"pub_status_now",
"filing_no", "filing_no",
"pub_type",
"filing_time", "filing_time",
"pub_no",
"gr_time", "gr_time",
"gr_no", "gr_no",
"pub_time", "pub_time",
"pub_no", "agency_code",
"agency_name", "agency_name",
"agent_name1",
"agent_name2",
"applicant_name", "applicant_name",
"inventor_name", "inventor_name",
"country_code",
"appl_zip",
"appl_address",
"main_ipc", "main_ipc",
"abstr_text", "abstr_text",
"pub_type" "filing_name",
"pub_status",
"pub_status_now",
"ipc_version",
"other_ipc",
"prior_info",
"pct_info",
"img_path",
"claim_text"
], ],
"sort": [ "sort": [
{ {
"filing_date": "desc" "filing_time": "desc"
} }
] ]
}; };
...@@ -1371,8 +1387,11 @@ auther:sy ...@@ -1371,8 +1387,11 @@ auther:sy
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits) { for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
......
...@@ -147,10 +147,13 @@ class CopyRightSearchApi extends ApiBase { ...@@ -147,10 +147,13 @@ class CopyRightSearchApi extends ApiBase {
res.total =0; res.total =0;
res.data = []; res.data = [];
if (j.hits.total >0){ if (j.hits.total >0){
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits){ for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
} if (element) {
res.data.push(element["_source"]);
}
}
} }
return System.getResult2(res, null); return System.getResult2(res, null);
} }
...@@ -223,10 +226,13 @@ class CopyRightSearchApi extends ApiBase { ...@@ -223,10 +226,13 @@ class CopyRightSearchApi extends ApiBase {
res.total =0; res.total =0;
res.data = []; res.data = [];
if (j.hits.total >0){ if (j.hits.total >0){
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits){ for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
} if (element) {
res.data.push(element["_source"]);
}
}
} }
return System.getResult2(res, null); return System.getResult2(res, null);
} }
...@@ -346,10 +352,13 @@ auther:sy ...@@ -346,10 +352,13 @@ auther:sy
res.total =0; res.total =0;
res.data = []; res.data = [];
if (j.hits.total >0){ if (j.hits.total >0){
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits){ for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
} if (element) {
res.data.push(element["_source"]);
}
}
} }
return System.getResult2(res, null); return System.getResult2(res, null);
} }
...@@ -421,10 +430,13 @@ auther:sy ...@@ -421,10 +430,13 @@ auther:sy
res.total =0; res.total =0;
res.data = []; res.data = [];
if (j.hits.total >0){ if (j.hits.total >0){
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits){ for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
} if (element) {
res.data.push(element["_source"]);
}
}
} }
return System.getResult2(res, null); return System.getResult2(res, null);
} }
......
...@@ -94,8 +94,11 @@ class EnterpriseService { ...@@ -94,8 +94,11 @@ class EnterpriseService {
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits) { for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
...@@ -235,8 +238,11 @@ class EnterpriseService { ...@@ -235,8 +238,11 @@ class EnterpriseService {
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits) { for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
...@@ -283,8 +289,11 @@ class EnterpriseService { ...@@ -283,8 +289,11 @@ class EnterpriseService {
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.aggregations.group_by_licence.buckets) { for (let index = 0; index < j.aggregations.group_by_licence.buckets.length; index++) {
res.data.push(j.aggregations.group_by_licence.buckets[x]); const element = j.aggregations.group_by_licence.buckets[index];
if (element) {
res.data.push(element);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
...@@ -351,8 +360,11 @@ class EnterpriseService { ...@@ -351,8 +360,11 @@ class EnterpriseService {
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits) { for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
...@@ -428,8 +440,11 @@ class EnterpriseService { ...@@ -428,8 +440,11 @@ class EnterpriseService {
res.data = []; res.data = [];
if (j.hits.total > 0) { if (j.hits.total > 0) {
res.total = j.hits.total; res.total = j.hits.total;
for (var x in j.hits.hits) { for (let index = 0; index < j.hits.hits.length; index++) {
res.data.push(j.hits.hits[x]["_source"]); const element = j.hits.hits[index];
if (element) {
res.data.push(element["_source"]);
}
} }
} }
return System.getResult2(res, null); return System.getResult2(res, null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment