-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
Copy pathesdocs.ts
59 lines (57 loc) · 2.3 KB
/
esdocs.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { i18n } from '@kbn/i18n';
import { esdocs } from '../../../canvas_plugin_src/functions/browser/esdocs';
import { FunctionHelp } from '../function_help';
import { FunctionFactory } from '../../../types';
import { ELASTICSEARCH, LUCENE } from '../../constants';
export const help: FunctionHelp<FunctionFactory<typeof esdocs>> = {
help: i18n.translate('xpack.canvas.functions.esdocsHelpText', {
defaultMessage:
'Query {ELASTICSEARCH} for raw documents. Specify the fields you want to retrieve, ' +
'especially if you are asking for a lot of rows.',
values: {
ELASTICSEARCH,
},
}),
args: {
query: i18n.translate('xpack.canvas.functions.esdocs.args.queryHelpText', {
defaultMessage: 'A {LUCENE} query string.',
values: {
LUCENE,
},
}),
count: i18n.translate('xpack.canvas.functions.esdocs.args.countHelpText', {
defaultMessage:
'The number of documents to retrieve. For better performance, use a smaller data set.',
}),
fields: i18n.translate('xpack.canvas.functions.esdocs.args.fieldsHelpText', {
defaultMessage: 'A comma-separated list of fields. For better performance, use fewer fields.',
}),
index: i18n.translate('xpack.canvas.functions.esdocs.args.indexHelpText', {
defaultMessage: 'An index or data view. For example, {example}.',
values: {
example: '`"logstash-*"`',
},
}),
metaFields: i18n.translate('xpack.canvas.functions.esdocs.args.metaFieldsHelpText', {
defaultMessage: 'Comma separated list of meta fields. For example, {example}.',
values: {
example: '`"_index,_type"`',
},
}),
sort: i18n.translate('xpack.canvas.functions.esdocs.args.sortHelpText', {
defaultMessage:
'The sort direction formatted as {directions}. For example, {example1} or {example2}.',
values: {
directions: `\`"${['field', 'direction'].join(', ')}"\``,
example1: `\`"${['@timestamp', 'desc'].join(', ')}"\``,
example2: `\`"${['bytes', 'asc'].join(', ')}"\``,
},
}),
},
};