feat(Elasticsearch Node): Add 'Source Excludes' and 'Source Includes' options on 'Document: getAll' operation (#3660)

* Added 'Source Excludes' and 'Source Includes' options on  'document: getAll' operation

* Updated credentials to use new system

Co-authored-by: mp <miguel@mconf.com>
Co-authored-by: miguel-mconf <107938570+miguel-mconf@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
This commit is contained in:
Jonathan Bennetts 2022-07-10 11:11:12 +01:00 committed by GitHub
parent eae9a60a43
commit 8999403228
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 7 deletions

View file

@ -55,10 +55,7 @@ export class ElasticsearchApi implements ICredentialType {
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials.baseUrl}}',
auth: {
username: '=${{credentias.username}}',
password: '=${{credentials.password}}',
},
url: '',
url: '/_xpack?human=false',
},
};}
};
}

View file

@ -8,6 +8,7 @@ import {
import {
IDataObject,
JsonObject,
NodeApiError,
} from 'n8n-workflow';
@ -47,6 +48,6 @@ export async function elasticsearchApiRequest(
try {
return await this.helpers.requestWithAuthentication.call(this, 'elasticsearchApi', options);
} catch (error) {
throw new NodeApiError(this.getNode(), error);
throw new NodeApiError(this.getNode(), error as JsonObject);
}
}

View file

@ -444,6 +444,20 @@ export const documentFields: INodeProperties[] = [
type: 'string',
default: '',
},
{
displayName: 'Source Excludes',
name: '_source_excludes',
description: 'Comma-separated list of source fields to exclude from the response',
type: 'string',
default: '',
},
{
displayName: 'Source Includes',
name: '_source_includes',
description: 'Comma-separated list of source fields to include in the response',
type: 'string',
default: '',
},
{
displayName: 'Stats',
name: 'stats',