@opra/elastic 1.7.0 → 1.7.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.
@@ -279,15 +279,15 @@ class ElasticCollectionService extends elastic_entity_service_js_1.ElasticEntity
279
279
  return r.hits?.hits.map((x) => x._source) || [];
280
280
  });
281
281
  }
282
- async search(request, options) {
282
+ async searchRaw(request, options) {
283
283
  const command = {
284
284
  crud: 'read',
285
- method: 'search',
285
+ method: 'searchRaw',
286
286
  byId: false,
287
287
  request,
288
288
  options,
289
289
  };
290
- return this._executeCommand(command, async () => this._search(command));
290
+ return this._executeCommand(command, async () => this._searchRaw(command));
291
291
  }
292
292
  /**
293
293
  *
@@ -242,7 +242,7 @@ class ElasticEntityService extends elastic_service_js_1.ElasticService {
242
242
  * @param {ElasticEntityService.SearchCommand} command - The search command containing the request configuration and optional transport settings.
243
243
  * @return {Promise<ElasticEntityService.SearchResponse>} A promise resolving to the search response from Elasticsearch.
244
244
  */
245
- async _search(command) {
245
+ async _searchRaw(command) {
246
246
  const { options } = command;
247
247
  const request = {
248
248
  index: this.getIndexName(),
@@ -276,15 +276,15 @@ export class ElasticCollectionService extends ElasticEntityService {
276
276
  return r.hits?.hits.map((x) => x._source) || [];
277
277
  });
278
278
  }
279
- async search(request, options) {
279
+ async searchRaw(request, options) {
280
280
  const command = {
281
281
  crud: 'read',
282
- method: 'search',
282
+ method: 'searchRaw',
283
283
  byId: false,
284
284
  request,
285
285
  options,
286
286
  };
287
- return this._executeCommand(command, async () => this._search(command));
287
+ return this._executeCommand(command, async () => this._searchRaw(command));
288
288
  }
289
289
  /**
290
290
  *
@@ -239,7 +239,7 @@ export class ElasticEntityService extends ElasticService {
239
239
  * @param {ElasticEntityService.SearchCommand} command - The search command containing the request configuration and optional transport settings.
240
240
  * @return {Promise<ElasticEntityService.SearchResponse>} A promise resolving to the search response from Elasticsearch.
241
241
  */
242
- async _search(command) {
242
+ async _searchRaw(command) {
243
243
  const { options } = command;
244
244
  const request = {
245
245
  index: this.getIndexName(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/elastic",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Opra Elastic Search adapter package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@elastic/elasticsearch": ">=8.7.0",
14
- "@opra/common": "^1.7.0",
15
- "@opra/core": "^1.7.0"
14
+ "@opra/common": "^1.7.1",
15
+ "@opra/core": "^1.7.1"
16
16
  },
17
17
  "type": "module",
18
18
  "exports": {
@@ -152,7 +152,7 @@ export declare class ElasticCollectionService<T extends object = any> extends El
152
152
  * @return {Promise<T | undefined>} A Promise that resolves to an array of partial outputs of type T.
153
153
  */
154
154
  findMany(options?: ElasticEntityService.FindManyOptions): Promise<T[]>;
155
- search(request: estypes.SearchRequest, options?: ElasticEntityService.SearchOptions): Promise<estypes.SearchResponse<PartialDTO<T>>>;
155
+ searchRaw(request: estypes.SearchRequest, options?: ElasticEntityService.SearchOptions): Promise<estypes.SearchResponse<PartialDTO<T>>>;
156
156
  /**
157
157
  * Finds multiple documents in the collection and returns both records (max limit)
158
158
  * and total count that matched the given criteria
@@ -253,7 +253,7 @@ export declare class ElasticEntityService<T extends object = any> extends Elasti
253
253
  * @param {ElasticEntityService.SearchCommand} command - The search command containing the request configuration and optional transport settings.
254
254
  * @return {Promise<ElasticEntityService.SearchResponse>} A promise resolving to the search response from Elasticsearch.
255
255
  */
256
- protected _search(command: ElasticEntityService.SearchCommand): Promise<ElasticEntityService.SearchResponse<PartialDTO<T>>>;
256
+ protected _searchRaw(command: ElasticEntityService.SearchCommand): Promise<ElasticEntityService.SearchResponse<PartialDTO<T>>>;
257
257
  /**
258
258
  * Updates multiple documents in the collection based on the specified input and options.
259
259
  *