Commit 8b6af49d by 宋毅

tj

parent a667e52f
...@@ -38,7 +38,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -38,7 +38,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -87,7 +89,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -87,7 +89,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -136,7 +140,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -136,7 +140,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -184,7 +190,11 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -184,7 +190,11 @@ class CPatentAggregationsApi extends ApiBase {
} }
}; };
if (obj && obj.length > 0) { if (obj && obj.length > 0) {
params.query.bool.must = obj; for (var x in obj) {
if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
}
} else { } else {
return rtn = { return rtn = {
status: -100, status: -100,
...@@ -245,7 +255,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -245,7 +255,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -294,7 +306,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -294,7 +306,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -343,7 +357,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -343,7 +357,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -392,7 +408,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -392,7 +408,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -441,7 +459,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -441,7 +459,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -490,7 +510,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -490,7 +510,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -521,7 +543,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -521,7 +543,7 @@ class CPatentAggregationsApi extends ApiBase {
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"bool": {"must_not":{"exists" : { "field" : "gr_no" }}}} { "bool": { "must_not": { "exists": { "field": "gr_no" } } } }
] ]
} }
}, },
...@@ -541,7 +563,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -541,7 +563,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -590,12 +614,12 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -590,12 +614,12 @@ class CPatentAggregationsApi extends ApiBase {
} }
}; };
obj.push({ "exists": { "field": "gr_no" } }); obj.push({ "exists": { "field": "gr_no" } });
params.query.bool.must = obj;
// for (var x in obj) { for (var x in obj) {
// if (obj[x]) { if (obj[x]) {
// params.query.bool.must.push(obj[x]); params.query.bool.must.push(obj[x]);
// } }
// } }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn = null; var rtn = null;
...@@ -644,7 +668,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -644,7 +668,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -694,7 +720,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -694,7 +720,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -752,7 +780,11 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -752,7 +780,11 @@ class CPatentAggregationsApi extends ApiBase {
// clientIp: "" // clientIp: ""
// }); // });
if (obj && obj.length > 0) { if (obj && obj.length > 0) {
params.query.bool.must = obj; for (var x in obj) {
if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
}
} }
else { else {
return rtn = { return rtn = {
...@@ -762,11 +794,6 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -762,11 +794,6 @@ class CPatentAggregationsApi extends ApiBase {
buckets: null buckets: null
}; };
} }
// for (var x in obj) {
// if (obj[x] && obj[x] != null && obj[x] != "undefined") {
// params.query.bool.must = obj;
// }
// }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn = null; var rtn = null;
...@@ -822,7 +849,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -822,7 +849,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -872,7 +901,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -872,7 +901,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -922,7 +953,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -922,7 +953,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -972,7 +1005,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -972,7 +1005,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1022,7 +1057,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1022,7 +1057,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1071,7 +1108,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1071,7 +1108,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1131,7 +1170,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1131,7 +1170,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1180,7 +1221,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1180,7 +1221,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1240,7 +1283,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1240,7 +1283,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1289,7 +1334,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1289,7 +1334,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1349,7 +1396,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1349,7 +1396,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1398,7 +1447,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1398,7 +1447,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1458,7 +1509,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1458,7 +1509,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1519,8 +1572,8 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1519,8 +1572,8 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
if(obj[x]){ if (obj[x]) {
params.query.bool.must.push(obj[x]); params.query.bool.must.push(obj[x]);
} }
} }
...@@ -1581,7 +1634,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1581,7 +1634,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1641,7 +1696,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1641,7 +1696,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1672,7 +1729,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1672,7 +1729,7 @@ class CPatentAggregationsApi extends ApiBase {
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"exists" : { "field" : "gr_no" }} { "exists": { "field": "gr_no" } }
] ]
} }
}, },
...@@ -1692,7 +1749,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1692,7 +1749,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1740,7 +1799,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1740,7 +1799,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1799,7 +1860,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1799,7 +1860,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1858,7 +1921,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1858,7 +1921,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1917,7 +1982,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1917,7 +1982,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1976,7 +2043,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -1976,7 +2043,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2035,7 +2104,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2035,7 +2104,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2065,7 +2136,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2065,7 +2136,7 @@ class CPatentAggregationsApi extends ApiBase {
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"exists" : { "field" : "province_name" }} { "exists": { "field": "province_name" } }
] ]
} }
}, },
...@@ -2085,7 +2156,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2085,7 +2156,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2116,7 +2189,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2116,7 +2189,7 @@ class CPatentAggregationsApi extends ApiBase {
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"exists" : { "field" : "city_name" }} { "exists": { "field": "city_name" } }
] ]
} }
}, },
...@@ -2136,7 +2209,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2136,7 +2209,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2166,7 +2241,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2166,7 +2241,7 @@ class CPatentAggregationsApi extends ApiBase {
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"exists" : { "field" : "county_name" }} { "exists": { "field": "county_name" } }
] ]
} }
}, },
...@@ -2186,7 +2261,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2186,7 +2261,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2244,7 +2321,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2244,7 +2321,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2313,7 +2392,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2313,7 +2392,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2382,7 +2463,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2382,7 +2463,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2451,7 +2534,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2451,7 +2534,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2520,7 +2605,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2520,7 +2605,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2580,7 +2667,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2580,7 +2667,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2640,7 +2729,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2640,7 +2729,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2700,7 +2791,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2700,7 +2791,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2760,7 +2853,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2760,7 +2853,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2820,7 +2915,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2820,7 +2915,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2880,7 +2977,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2880,7 +2977,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -2940,7 +3039,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -2940,7 +3039,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3000,7 +3101,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3000,7 +3101,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3060,7 +3163,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3060,7 +3163,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3120,7 +3225,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3120,7 +3225,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3180,7 +3287,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3180,7 +3287,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3209,7 +3318,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3209,7 +3318,7 @@ class CPatentAggregationsApi extends ApiBase {
"query": { "query": {
"bool": { "bool": {
"must": [ "must": [
{"exists" : { "field" : "gr_no" }} { "exists": { "field": "gr_no" } }
] ]
} }
}, },
...@@ -3229,7 +3338,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3229,7 +3338,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3289,7 +3400,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3289,7 +3400,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3349,7 +3462,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3349,7 +3462,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3409,7 +3524,9 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3409,7 +3524,9 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -3434,7 +3551,7 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3434,7 +3551,7 @@ class CPatentAggregationsApi extends ApiBase {
} }
}; };
async provincePubstatusAggs(obj,areaname,type) {//根据传的省|市|县信息不同类型聚合 async provincePubstatusAggs(obj, areaname, type) {//根据传的省|市|县信息不同类型聚合
var params = { var params = {
"query": { "query": {
"bool": { "bool": {
...@@ -3457,19 +3574,20 @@ class CPatentAggregationsApi extends ApiBase { ...@@ -3457,19 +3574,20 @@ class CPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
if(type==2){ if (type == 2) {
if(areaname=='北京市' || areaname=='天津市' ||areaname=='重庆市' ||areaname=='上海市') if (areaname == '北京市' || areaname == '天津市' || areaname == '重庆市' || areaname == '上海市') {
{ params.aggregations.group_by_country.terms.field = "county_name";
params.aggregations.group_by_country.terms.field="county_name";
} }
else{ else {
params.aggregations.group_by_country.terms.field="city_name"; params.aggregations.group_by_country.terms.field = "city_name";
} }
} }
else if (type ==3 || type == 4){ else if (type == 3 || type == 4) {
params.aggregations.group_by_country.terms.field="county_name"; params.aggregations.group_by_country.terms.field = "county_name";
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
var rtn = null; var rtn = null;
......
...@@ -32,7 +32,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -32,7 +32,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -81,7 +83,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -81,7 +83,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -130,7 +134,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -130,7 +134,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -179,7 +185,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -179,7 +185,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -228,7 +236,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -228,7 +236,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -261,11 +271,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -261,11 +271,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -287,7 +297,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -287,7 +297,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -320,11 +332,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -320,11 +332,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -357,7 +369,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -357,7 +369,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -390,11 +404,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -390,11 +404,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -427,7 +441,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -427,7 +441,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -460,11 +476,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -460,11 +476,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -486,7 +502,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -486,7 +502,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -519,11 +537,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -519,11 +537,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -556,7 +574,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -556,7 +574,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -589,11 +609,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -589,11 +609,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -626,7 +646,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -626,7 +646,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -659,11 +681,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -659,11 +681,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -685,7 +707,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -685,7 +707,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -718,11 +742,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -718,11 +742,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -755,7 +779,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -755,7 +779,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -788,11 +814,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -788,11 +814,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -825,7 +851,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -825,7 +851,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -858,11 +886,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -858,11 +886,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -884,7 +912,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -884,7 +912,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -917,11 +947,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -917,11 +947,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -954,7 +984,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -954,7 +984,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -987,11 +1019,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -987,11 +1019,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -1024,7 +1056,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1024,7 +1056,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1084,7 +1118,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1084,7 +1118,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1133,7 +1169,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1133,7 +1169,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1165,11 +1203,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1165,11 +1203,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -1202,7 +1240,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1202,7 +1240,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1261,7 +1301,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1261,7 +1301,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1320,7 +1362,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1320,7 +1362,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1379,7 +1423,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1379,7 +1423,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1411,11 +1457,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1411,11 +1457,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -1448,7 +1494,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1448,7 +1494,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1480,11 +1528,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1480,11 +1528,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -1517,7 +1565,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1517,7 +1565,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1549,11 +1599,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1549,11 +1599,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -1586,7 +1636,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1586,7 +1636,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
...@@ -1618,11 +1670,11 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1618,11 +1670,11 @@ class WPatentAggregationsApi extends ApiBase {
"must": [ "must": [
{ {
"bool": { "bool": {
"must_not": { "must_not": {
"wildcard": { "wildcard": {
"main_ipc": "*-*" "main_ipc": "*-*"
}
} }
}
} }
} }
] ]
...@@ -1655,7 +1707,9 @@ class WPatentAggregationsApi extends ApiBase { ...@@ -1655,7 +1707,9 @@ class WPatentAggregationsApi extends ApiBase {
}; };
for (var x in obj) { for (var x in obj) {
params.query.bool.must.push(obj[x]); if (obj[x]) {
params.query.bool.must.push(obj[x]);
}
} }
var rc = System.getObject("util.execClient"); var rc = System.getObject("util.execClient");
......
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