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

[Data] Cleanup filter docs #107169

Merged
merged 20 commits into from
Aug 2, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
typos
Liza K committed Jul 29, 2021
commit cf9d0eb46ef35e975b0aadd761c3ba278fad312c
2 changes: 1 addition & 1 deletion packages/kbn-es-query/src/es_query/build_es_query.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ import { Filter, Query } from '../filters';
import { IndexPatternBase } from './types';

/**
* Configurations to be usd while constructing an ES query.
* Configurations to be used while constructing an ES query.
* @public
*/
export interface EsQueryConfig {
4 changes: 2 additions & 2 deletions src/plugins/data/common/search/aggs/agg_configs.ts
Original file line number Diff line number Diff line change
@@ -378,7 +378,7 @@ export class AggConfigs {
if (!this.hasTimeShifts()) {
return this.timeFields
.map((fieldName) => getTime(this.indexPattern, timeRange, { fieldName, forceNow }))
.filter(isRangeFilter);
.filter((f) => !!f && isRangeFilter(f));
}
return [
{
@@ -402,7 +402,7 @@ export class AggConfigs {
fieldName,
] as [RangeFilter | undefined, string]
)
.filter(([filter]) => isRangeFilter(filter))
.filter(([filter]) => !!filter && isRangeFilter(filter))
.map(([filter, field]) => ({
range: {
[field]: {