xlucene-translator 2.1.0 → 2.2.1
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.
|
@@ -2,7 +2,7 @@ import { SortOrder, ElasticsearchDSLOptions, xLuceneTypeConfig, xLuceneVariables
|
|
|
2
2
|
export interface RestrictSearchQueryOptions extends ElasticsearchDSLOptions {
|
|
3
3
|
variables?: xLuceneVariables;
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* opensearch search parameters
|
|
6
6
|
* _source_includes and _source_excludes will be filtered based
|
|
7
7
|
* on the excludes and includes fields specified in the config
|
|
8
8
|
*/
|
|
@@ -33,9 +33,9 @@ export declare class QueryAccess<T extends Record<string, any> = Record<string,
|
|
|
33
33
|
private _restrict;
|
|
34
34
|
private _restrictTypeConfig;
|
|
35
35
|
/**
|
|
36
|
-
* Converts a restricted xlucene query to an
|
|
36
|
+
* Converts a restricted xlucene query to an opensearch search query
|
|
37
37
|
*
|
|
38
|
-
* @returns a restricted
|
|
38
|
+
* @returns a restricted opensearch search query
|
|
39
39
|
*/
|
|
40
40
|
restrictSearchQuery(query: string, opts?: RestrictSearchQueryOptions, _overrideParsedQuery?: Node): Promise<ClientParams.SearchParams>;
|
|
41
41
|
/**
|
|
@@ -157,9 +157,9 @@ export class QueryAccess {
|
|
|
157
157
|
return parsedConfig;
|
|
158
158
|
}
|
|
159
159
|
/**
|
|
160
|
-
* Converts a restricted xlucene query to an
|
|
160
|
+
* Converts a restricted xlucene query to an opensearch search query
|
|
161
161
|
*
|
|
162
|
-
* @returns a restricted
|
|
162
|
+
* @returns a restricted opensearch search query
|
|
163
163
|
*/
|
|
164
164
|
async restrictSearchQuery(query, opts, _overrideParsedQuery) {
|
|
165
165
|
const { params: _params = {}, majorVersion = 2, minorVersion = 15, distribution = ElasticsearchDistribution.opensearch, version = '2.15.0', ...options } = opts ?? {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xlucene-translator",
|
|
3
3
|
"displayName": "xLucene Translator",
|
|
4
|
-
"version": "2.1
|
|
4
|
+
"version": "2.2.1",
|
|
5
5
|
"description": "Translate xlucene query to database queries",
|
|
6
6
|
"homepage": "https://github.com/terascope/teraslice/tree/master/packages/xlucene-translator#readme",
|
|
7
7
|
"repository": {
|
|
@@ -21,30 +21,21 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist/src/**/*"
|
|
23
23
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc --build",
|
|
26
|
-
"build:watch": "yarn build --watch",
|
|
27
|
-
"test": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test ../xlucene-translator --",
|
|
28
|
-
"test:debug": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test --debug ../xlucene-translator --",
|
|
29
|
-
"test:opensearch2": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test ../xlucene-translator --",
|
|
30
|
-
"test:opensearch3": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=3.1.0 node ../scripts/bin/ts-scripts test ../xlucene-translator --",
|
|
31
|
-
"test:watch": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test --watch ../xlucene-translator --"
|
|
32
|
-
},
|
|
33
24
|
"dependencies": {
|
|
34
|
-
"@terascope/core-utils": "~2.1.0",
|
|
35
|
-
"@terascope/geo-utils": "~2.1.0",
|
|
36
|
-
"@terascope/types": "~2.1.0",
|
|
37
25
|
"@types/elasticsearch": "~5.0.43",
|
|
38
|
-
"
|
|
26
|
+
"@terascope/core-utils": "~2.2.1",
|
|
27
|
+
"@terascope/geo-utils": "~2.2.1",
|
|
28
|
+
"@terascope/types": "~2.2.1",
|
|
29
|
+
"xlucene-parser": "~2.2.1"
|
|
39
30
|
},
|
|
40
31
|
"devDependencies": {
|
|
41
|
-
"
|
|
42
|
-
"@terascope/
|
|
43
|
-
"
|
|
32
|
+
"elasticsearch": "~15.4.1",
|
|
33
|
+
"@terascope/data-types": "~2.2.2",
|
|
34
|
+
"@terascope/opensearch-client": "~2.2.2"
|
|
44
35
|
},
|
|
45
36
|
"engines": {
|
|
46
37
|
"node": ">=22.0.0",
|
|
47
|
-
"
|
|
38
|
+
"pnpm": ">=10.25.0"
|
|
48
39
|
},
|
|
49
40
|
"publishConfig": {
|
|
50
41
|
"access": "public",
|
|
@@ -54,5 +45,14 @@
|
|
|
54
45
|
"terascope": {
|
|
55
46
|
"enableTypedoc": true,
|
|
56
47
|
"testSuite": "search"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "tsc --build",
|
|
51
|
+
"build:watch": "pnpm build --watch",
|
|
52
|
+
"test": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test ../xlucene-translator --",
|
|
53
|
+
"test:debug": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test --debug ../xlucene-translator --",
|
|
54
|
+
"test:opensearch2": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test ../xlucene-translator --",
|
|
55
|
+
"test:opensearch3": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=3.1.0 node ../scripts/bin/ts-scripts test ../xlucene-translator --",
|
|
56
|
+
"test:watch": "TEST_OPENSEARCH='true' OPENSEARCH_VERSION=2.15.0 node ../scripts/bin/ts-scripts test --watch ../xlucene-translator --"
|
|
57
57
|
}
|
|
58
58
|
}
|