mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
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:
parent
eae9a60a43
commit
8999403228
|
@ -55,10 +55,7 @@ export class ElasticsearchApi implements ICredentialType {
|
||||||
test: ICredentialTestRequest = {
|
test: ICredentialTestRequest = {
|
||||||
request: {
|
request: {
|
||||||
baseURL: '={{$credentials.baseUrl}}',
|
baseURL: '={{$credentials.baseUrl}}',
|
||||||
auth: {
|
url: '/_xpack?human=false',
|
||||||
username: '=${{credentias.username}}',
|
|
||||||
password: '=${{credentials.password}}',
|
|
||||||
},
|
|
||||||
url: '',
|
|
||||||
},
|
},
|
||||||
};}
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import {
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IDataObject,
|
IDataObject,
|
||||||
|
JsonObject,
|
||||||
NodeApiError,
|
NodeApiError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
|
@ -47,6 +48,6 @@ export async function elasticsearchApiRequest(
|
||||||
try {
|
try {
|
||||||
return await this.helpers.requestWithAuthentication.call(this, 'elasticsearchApi', options);
|
return await this.helpers.requestWithAuthentication.call(this, 'elasticsearchApi', options);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new NodeApiError(this.getNode(), error);
|
throw new NodeApiError(this.getNode(), error as JsonObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -444,6 +444,20 @@ export const documentFields: INodeProperties[] = [
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: '',
|
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',
|
displayName: 'Stats',
|
||||||
name: 'stats',
|
name: 'stats',
|
||||||
|
|
Loading…
Reference in a new issue