elasticlink 0.4.0-beta → 0.4.1-beta

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.
Files changed (67) hide show
  1. package/package.json +2 -2
  2. package/dist/__tests__/aggregation-builder.test.d.ts +0 -2
  3. package/dist/__tests__/aggregation-builder.test.d.ts.map +0 -1
  4. package/dist/__tests__/aggregation-builder.test.js +0 -622
  5. package/dist/__tests__/bulk.test.d.ts +0 -2
  6. package/dist/__tests__/bulk.test.d.ts.map +0 -1
  7. package/dist/__tests__/bulk.test.js +0 -679
  8. package/dist/__tests__/examples.test.d.ts +0 -2
  9. package/dist/__tests__/examples.test.d.ts.map +0 -1
  10. package/dist/__tests__/examples.test.js +0 -2123
  11. package/dist/__tests__/fixtures/finance.d.ts +0 -58
  12. package/dist/__tests__/fixtures/finance.d.ts.map +0 -1
  13. package/dist/__tests__/fixtures/finance.js +0 -73
  14. package/dist/__tests__/fixtures/legal.d.ts +0 -14
  15. package/dist/__tests__/fixtures/legal.d.ts.map +0 -1
  16. package/dist/__tests__/fixtures/legal.js +0 -27
  17. package/dist/__tests__/fixtures/real-estate.d.ts +0 -31
  18. package/dist/__tests__/fixtures/real-estate.d.ts.map +0 -1
  19. package/dist/__tests__/fixtures/real-estate.js +0 -39
  20. package/dist/__tests__/index-management.test.d.ts +0 -2
  21. package/dist/__tests__/index-management.test.d.ts.map +0 -1
  22. package/dist/__tests__/index-management.test.js +0 -1699
  23. package/dist/__tests__/integration/aggregation.integration.test.d.ts +0 -2
  24. package/dist/__tests__/integration/aggregation.integration.test.d.ts.map +0 -1
  25. package/dist/__tests__/integration/aggregation.integration.test.js +0 -188
  26. package/dist/__tests__/integration/bulk.integration.test.d.ts +0 -2
  27. package/dist/__tests__/integration/bulk.integration.test.d.ts.map +0 -1
  28. package/dist/__tests__/integration/bulk.integration.test.js +0 -90
  29. package/dist/__tests__/integration/fixtures/finance.d.ts +0 -37
  30. package/dist/__tests__/integration/fixtures/finance.d.ts.map +0 -1
  31. package/dist/__tests__/integration/fixtures/finance.js +0 -58
  32. package/dist/__tests__/integration/fixtures/legal.d.ts +0 -38
  33. package/dist/__tests__/integration/fixtures/legal.d.ts.map +0 -1
  34. package/dist/__tests__/integration/fixtures/legal.js +0 -65
  35. package/dist/__tests__/integration/fixtures/real-estate.d.ts +0 -17
  36. package/dist/__tests__/integration/fixtures/real-estate.d.ts.map +0 -1
  37. package/dist/__tests__/integration/fixtures/real-estate.js +0 -28
  38. package/dist/__tests__/integration/helpers.d.ts +0 -15
  39. package/dist/__tests__/integration/helpers.d.ts.map +0 -1
  40. package/dist/__tests__/integration/helpers.js +0 -21
  41. package/dist/__tests__/integration/index-management.integration.test.d.ts +0 -2
  42. package/dist/__tests__/integration/index-management.integration.test.d.ts.map +0 -1
  43. package/dist/__tests__/integration/index-management.integration.test.js +0 -67
  44. package/dist/__tests__/integration/multi-search.integration.test.d.ts +0 -2
  45. package/dist/__tests__/integration/multi-search.integration.test.d.ts.map +0 -1
  46. package/dist/__tests__/integration/multi-search.integration.test.js +0 -49
  47. package/dist/__tests__/integration/query.integration.test.d.ts +0 -2
  48. package/dist/__tests__/integration/query.integration.test.d.ts.map +0 -1
  49. package/dist/__tests__/integration/query.integration.test.js +0 -101
  50. package/dist/__tests__/integration/suggester.integration.test.d.ts +0 -2
  51. package/dist/__tests__/integration/suggester.integration.test.d.ts.map +0 -1
  52. package/dist/__tests__/integration/suggester.integration.test.js +0 -42
  53. package/dist/__tests__/multi-search.test.d.ts +0 -2
  54. package/dist/__tests__/multi-search.test.d.ts.map +0 -1
  55. package/dist/__tests__/multi-search.test.js +0 -325
  56. package/dist/__tests__/query-builder-extensions.test.d.ts +0 -2
  57. package/dist/__tests__/query-builder-extensions.test.d.ts.map +0 -1
  58. package/dist/__tests__/query-builder-extensions.test.js +0 -436
  59. package/dist/__tests__/query-builder.test.d.ts +0 -2
  60. package/dist/__tests__/query-builder.test.d.ts.map +0 -1
  61. package/dist/__tests__/query-builder.test.js +0 -5482
  62. package/dist/__tests__/settings-presets.test.d.ts +0 -2
  63. package/dist/__tests__/settings-presets.test.d.ts.map +0 -1
  64. package/dist/__tests__/settings-presets.test.js +0 -183
  65. package/dist/__tests__/suggester.test.d.ts +0 -2
  66. package/dist/__tests__/suggester.test.d.ts.map +0 -1
  67. package/dist/__tests__/suggester.test.js +0 -1006
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=settings-presets.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"settings-presets.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/settings-presets.test.ts"],"names":[],"mappings":""}
@@ -1,183 +0,0 @@
1
- import { fastIngestSettings, productionSearchSettings, indexSortSettings, indexBuilder } from '..';
2
- describe('Settings Presets', () => {
3
- describe('productionSearchSettings', () => {
4
- it('should return balanced production defaults', () => {
5
- const result = productionSearchSettings();
6
- expect(result).toMatchInlineSnapshot(`
7
- {
8
- "number_of_replicas": 1,
9
- "refresh_interval": "5s",
10
- }
11
- `);
12
- });
13
- it('should allow overriding defaults', () => {
14
- const result = productionSearchSettings({
15
- number_of_replicas: 2,
16
- refresh_interval: '10s'
17
- });
18
- expect(result).toMatchInlineSnapshot(`
19
- {
20
- "number_of_replicas": 2,
21
- "refresh_interval": "10s",
22
- }
23
- `);
24
- });
25
- it('should allow adding codec compression', () => {
26
- const result = productionSearchSettings({ codec: 'best_compression' });
27
- expect(result).toMatchInlineSnapshot(`
28
- {
29
- "codec": "best_compression",
30
- "number_of_replicas": 1,
31
- "refresh_interval": "5s",
32
- }
33
- `);
34
- });
35
- });
36
- describe('indexSortSettings', () => {
37
- it('should generate sort config from a single field', () => {
38
- const result = indexSortSettings({ timestamp: 'desc' });
39
- expect(result).toMatchInlineSnapshot(`
40
- {
41
- "sort": {
42
- "field": [
43
- "timestamp",
44
- ],
45
- "order": [
46
- "desc",
47
- ],
48
- },
49
- }
50
- `);
51
- });
52
- it('should generate sort config from multiple fields', () => {
53
- const result = indexSortSettings({
54
- timestamp: 'desc',
55
- status: 'asc',
56
- priority: 'desc'
57
- });
58
- expect(result).toMatchInlineSnapshot(`
59
- {
60
- "sort": {
61
- "field": [
62
- "timestamp",
63
- "status",
64
- "priority",
65
- ],
66
- "order": [
67
- "desc",
68
- "asc",
69
- "desc",
70
- ],
71
- },
72
- }
73
- `);
74
- });
75
- it('should compose with other settings via spread', () => {
76
- const result = {
77
- ...productionSearchSettings(),
78
- index: indexSortSettings({ timestamp: 'desc' })
79
- };
80
- expect(result).toMatchInlineSnapshot(`
81
- {
82
- "index": {
83
- "sort": {
84
- "field": [
85
- "timestamp",
86
- ],
87
- "order": [
88
- "desc",
89
- ],
90
- },
91
- },
92
- "number_of_replicas": 1,
93
- "refresh_interval": "5s",
94
- }
95
- `);
96
- });
97
- });
98
- describe('fastIngestSettings', () => {
99
- it('should return optimized settings for bulk ingestion', () => {
100
- const result = fastIngestSettings();
101
- expect(result).toMatchInlineSnapshot(`
102
- {
103
- "number_of_replicas": 0,
104
- "refresh_interval": "-1",
105
- "translog": {
106
- "durability": "async",
107
- "sync_interval": "30s",
108
- },
109
- }
110
- `);
111
- });
112
- it('should allow overriding defaults', () => {
113
- const result = fastIngestSettings({ number_of_replicas: 1 });
114
- expect(result).toMatchInlineSnapshot(`
115
- {
116
- "number_of_replicas": 1,
117
- "refresh_interval": "-1",
118
- "translog": {
119
- "durability": "async",
120
- "sync_interval": "30s",
121
- },
122
- }
123
- `);
124
- });
125
- it('should allow adding extra settings', () => {
126
- const result = fastIngestSettings({ number_of_shards: 3 });
127
- expect(result).toMatchInlineSnapshot(`
128
- {
129
- "number_of_replicas": 0,
130
- "number_of_shards": 3,
131
- "refresh_interval": "-1",
132
- "translog": {
133
- "durability": "async",
134
- "sync_interval": "30s",
135
- },
136
- }
137
- `);
138
- });
139
- it('should deep-merge translog overrides without clobbering defaults', () => {
140
- const result = fastIngestSettings({ translog: { durability: 'request' } });
141
- expect(result).toMatchInlineSnapshot(`
142
- {
143
- "number_of_replicas": 0,
144
- "refresh_interval": "-1",
145
- "translog": {
146
- "durability": "request",
147
- "sync_interval": "30s",
148
- },
149
- }
150
- `);
151
- });
152
- });
153
- describe('Preset integration with indexBuilder', () => {
154
- it('should work with indexBuilder().settings()', () => {
155
- const result = indexBuilder().settings(productionSearchSettings()).build();
156
- expect(result).toMatchInlineSnapshot(`
157
- {
158
- "settings": {
159
- "number_of_replicas": 1,
160
- "refresh_interval": "5s",
161
- },
162
- }
163
- `);
164
- });
165
- it('should allow spreading presets with additional settings', () => {
166
- const result = indexBuilder()
167
- .settings({
168
- ...productionSearchSettings(),
169
- number_of_shards: 3
170
- })
171
- .build();
172
- expect(result).toMatchInlineSnapshot(`
173
- {
174
- "settings": {
175
- "number_of_replicas": 1,
176
- "number_of_shards": 3,
177
- "refresh_interval": "5s",
178
- },
179
- }
180
- `);
181
- });
182
- });
183
- });
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=suggester.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suggester.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/suggester.test.ts"],"names":[],"mappings":""}