fix(search-backend-module-elasticsearch): use targeted index refresh instead of full cluster refresh
Signed-off-by: nojaf <florian.verdonck@outlook.com>
This commit is contained in:
+2
-1
@@ -60,10 +60,11 @@ describe('ElasticSearchSearchEngineIndexer', () => {
|
||||
bulkSpy,
|
||||
);
|
||||
refreshSpy = jest.fn().mockReturnValue({});
|
||||
// Use specific pattern to avoid conflict with /some-type-index__* wildcard mock
|
||||
mock.add(
|
||||
{
|
||||
method: 'GET',
|
||||
path: '/:index/_refresh',
|
||||
path: '/some-type-index__:ts/_refresh',
|
||||
},
|
||||
refreshSpy,
|
||||
);
|
||||
|
||||
+2
-1
@@ -97,7 +97,8 @@ export class ElasticSearchSearchEngineIndexer extends BatchSearchEngineIndexer {
|
||||
: {}),
|
||||
};
|
||||
},
|
||||
refreshOnCompletion: options.skipRefresh !== true,
|
||||
refreshOnCompletion:
|
||||
options.skipRefresh !== true ? that.indexName : false,
|
||||
});
|
||||
|
||||
// Safely catch errors thrown by the bulk helper client, e.g. HTTP timeouts
|
||||
|
||||
Reference in New Issue
Block a user