tango-app-api-infra 3.9.25-vmsbug.1 → 3.9.25-vmsbug.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-infra",
3
- "version": "3.9.25-vmsbug.1",
3
+ "version": "3.9.25-vmsbug.2",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2564,11 +2564,11 @@ export async function ticketList( req, res ) {
2564
2564
  }
2565
2565
  const searchQuery = {
2566
2566
 
2567
- size: limit, // or use parseInt(req.query.limit) for dynamic
2568
- from: offset, // or use parseInt(req.query.offset) for dynamic
2569
- sort: [ { 'createdAt': { order: 'desc' } } ],
2570
-
2571
- query: {
2567
+ 'size': limit, // or use parseInt(req.query.limit) for dynamic
2568
+ 'from': offset, // or use parseInt(req.query.offset) for dynamic
2569
+ 'sort': [ { 'createdAt': { order: 'desc' } } ],
2570
+ 'track_total_hits': true,
2571
+ 'query': {
2572
2572
  bool: {
2573
2573
  must: [
2574
2574
  {
@@ -2817,52 +2817,6 @@ export async function ticketList( req, res ) {
2817
2817
  },
2818
2818
  ];
2819
2819
  break;
2820
- // case 'revicedPerc':
2821
- // searchQuery.sort = [
2822
- // {
2823
- // _script: {
2824
- // type: 'string',
2825
- // script: {
2826
- // lang: 'painless',
2827
- // source: `
2828
- // try {
2829
- // if (params._source != null && params._source.mappingInfo != null) {
2830
- // String found = null;
2831
-
2832
- // for (def item : params._source.mappingInfo) {
2833
- // if (item != null && item.type == params.miType && item.revicedPerc != null) {
2834
- // String value = item.revicedPerc.toString();
2835
-
2836
- // if (found == null || value.compareTo(found) > 0) {
2837
- // found = value;
2838
- // }
2839
- // }
2840
- // }
2841
-
2842
- // if (found != null) {
2843
- // return found;
2844
- // }
2845
- // }
2846
- // } catch (Exception e) {
2847
- // // ignore and fallback
2848
- // }
2849
-
2850
- // // fallback to root-level revicedPerc
2851
- // if (params._source != null && params._source.revicedPerc != null) {
2852
- // return params._source.revicedPerc.toString();
2853
- // }
2854
-
2855
- // return "";
2856
- // `,
2857
- // params: {
2858
- // miType: requestedSortType,
2859
- // },
2860
- // },
2861
- // order: sortOrder,
2862
- // },
2863
- // },
2864
- // ];
2865
- // break;
2866
2820
  case 'revicedPerc':
2867
2821
  searchQuery.sort = [
2868
2822
  {