refactor: use core supplied mappings

This commit is contained in:
Wieland Schöbl
2021-09-03 15:17:15 +00:00
committed by Rainer Killinger
parent 614a1b1e9b
commit 43a89ec4f2
22 changed files with 1622 additions and 1762 deletions

View File

@@ -22,15 +22,19 @@ import {
SCThingType
} from '@openstapps/core';
import {expect} from 'chai';
import {ESDateRangeFilter, ESRangeFilter} from '../../../src/storage/elasticsearch/common';
import {ESNumericRangeFilter} from '../../../src/storage/elasticsearch/common';
import {configFile} from '../../../src/common';
import {
ElasticsearchConfig, ESBooleanFilter, ESGenericSort, ESGeoDistanceFilter,
ESDateRangeFilter,
ESRangeFilter,
ESNumericRangeFilter,
ElasticsearchConfig,
ESBooleanFilter,
ESGenericSort,
ESGeoDistanceFilter,
ESGeoDistanceSort,
ESTermFilter,
ScriptSort
} from '../../../src/storage/elasticsearch/common';
} from '../../../src/storage/elasticsearch/types/elasticsearch';
import {configFile} from '../../../src/common';
import {buildBooleanFilter, buildFilter, buildQuery, buildSort} from '../../../src/storage/elasticsearch/query';
describe('Query', function () {
@@ -366,7 +370,7 @@ describe('Query', function () {
}
});
it('should default to second scope', function() {
it('should default to second scope', function () {
const filter = buildFilter({
type: 'availability',
arguments: {
@@ -384,7 +388,7 @@ describe('Query', function () {
},
};
expect(filter).to.be.eql(expectedFilter);
})
});
it('should add || to dates', function () {
const filter = buildFilter({