Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup filter docs #93405

Merged
merged 2 commits into from
Mar 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions api_docs/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -26207,106 +26207,6 @@
"returnComment": [],
"initialIsOpen": false
},
{
"id": "def-common.getConvertedValueForField",
"type": "Function",
"children": [
{
"type": "Object",
"label": "field",
"isRequired": true,
"signature": [
{
"pluginId": "data",
"scope": "common",
"docId": "kibDataIndexPatternsPluginApi",
"section": "def-common.IFieldType",
"text": "IFieldType"
}
],
"description": [],
"source": {
"path": "src/plugins/data/common/es_query/filters/phrase_filter.ts",
"lineNumber": 107,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L107"
}
},
{
"type": "Any",
"label": "value",
"isRequired": true,
"signature": [
"any"
],
"description": [],
"source": {
"path": "src/plugins/data/common/es_query/filters/phrase_filter.ts",
"lineNumber": 107,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L107"
}
}
],
"signature": [
"(field: ",
{
"pluginId": "data",
"scope": "common",
"docId": "kibDataIndexPatternsPluginApi",
"section": "def-common.IFieldType",
"text": "IFieldType"
},
", value: any) => any"
],
"description": [
"\nSee issues bellow for the reason behind this change.\nValues need to be converted to correct types for boolean \\ numeric fields.\nhttps://github.com/elastic/kibana/issues/74301\nhttps://github.com/elastic/kibana/issues/8677\nhttps://github.com/elastic/elasticsearch/issues/20941\nhttps://github.com/elastic/elasticsearch/pull/22201"
],
"label": "getConvertedValueForField",
"source": {
"path": "src/plugins/data/common/es_query/filters/phrase_filter.ts",
"lineNumber": 107,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L107"
},
"tags": [],
"returnComment": [],
"initialIsOpen": false
},
{
"id": "def-common.buildInlineScriptForPhraseFilter",
"type": "Function",
"children": [
{
"type": "Any",
"label": "scriptedField",
"isRequired": true,
"signature": [
"any"
],
"description": [],
"source": {
"path": "src/plugins/data/common/es_query/filters/phrase_filter.ts",
"lineNumber": 132,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L132"
}
}
],
"signature": [
"(scriptedField: any) => string"
],
"description": [
"\nTakes a scripted field and returns an inline script appropriate for use in a script query.\nHandles lucene expression and Painless scripts. Other langs aren't guaranteed to generate valid\nscripts.\n"
],
"label": "buildInlineScriptForPhraseFilter",
"source": {
"path": "src/plugins/data/common/es_query/filters/phrase_filter.ts",
"lineNumber": 132,
"link": "https://github.com/elastic/kibana/tree/mastersrc/plugins/data/common/es_query/filters/phrase_filter.ts#L132"
},
"tags": [],
"returnComment": [
"The inline script string"
],
"initialIsOpen": false
},
{
"id": "def-common.isPhrasesFilter",
"type": "Function",
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/data/common/es_query/filters/phrase_filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const getPhraseScript = (field: IFieldType, value: string) => {
};

/**
* @internal
* See issues bellow for the reason behind this change.
* Values need to be converted to correct types for boolean \ numeric fields.
* https://github.com/elastic/kibana/issues/74301
Expand All @@ -122,6 +123,7 @@ export const getConvertedValueForField = (field: IFieldType, value: any) => {
};

/**
* @internal
* Takes a scripted field and returns an inline script appropriate for use in a script query.
* Handles lucene expression and Painless scripts. Other langs aren't guaranteed to generate valid
* scripts.
Expand Down