Skip to content
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"@elastic/datemath": "5.0.3",
"@elastic/ebt": "^1.1.1",
"@elastic/ecs": "^8.11.5",
"@elastic/elasticsearch": "9.0.1",
"@elastic/elasticsearch": "9.0.2",
"@elastic/ems-client": "8.6.3",
"@elastic/eui": "102.1.0",
"@elastic/eui-theme-borealis": "1.0.0",
Expand Down
6 changes: 5 additions & 1 deletion x-pack/platform/plugins/shared/alerting/common/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
RuleAction,
RuleSystemAction,
RuleActionParam,
AlertsFilter,
} from '@kbn/alerting-types';

export type {
Expand Down Expand Up @@ -70,7 +71,10 @@ export const RuleLastRunOutcomeOrderMap: Record<RuleLastRunOutcomes, number> = {

export type RuleAlertingOutcome = 'failure' | 'success' | 'unknown' | 'warning';

export type RuleActionAlertsFilterProperty = AlertsFilterTimeframe | RuleActionParam;
export type RuleActionAlertsFilterProperty =
| AlertsFilterTimeframe
| RuleActionParam
| AlertsFilter['query'];

export type RuleActionKey = keyof RuleAction;
export type RuleSystemActionKey = keyof RuleSystemAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* 2.0.
*/

import { AnalysisTokenFilter } from '@elastic/elasticsearch/lib/api/types';
import type { AnalysisTokenFilter, AnalysisStopWords } from '@elastic/elasticsearch/lib/api/types';

interface LanguageDataEntry {
custom_filter_definitions?: object;
name: string;
stemmer: string;
stop_words: string;
stop_words: AnalysisStopWords;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, I initially suggested AnalysisStopWordLanguage because LanguageDataEntry is only used below with languages and not with lists of stop words. But this is fine too.

(Also applies to x-pack/solutions/search/plugins/enterprise_search/server/lib/indices/text_analysis.ts)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad! Sorry!

postpended_filters?: string[];
prepended_filters?: string[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
IngestDocument,
IngestProcessorContainer,
IngestSimulateRequest,
IngestPipelineSimulation,
IngestPipelineProcessorResult,
IngestSimulateDocumentResult,
SimulateIngestRequest,
IndicesIndexState,
Expand Down Expand Up @@ -785,14 +785,14 @@ const computeMappingProperties = (detectedFields: NamedFieldDefinitionConfig[])
* Guard helpers
*/
const isSuccessfulProcessor = (
processor: IngestPipelineSimulation
): processor is WithRequired<IngestPipelineSimulation, 'doc' | 'tag'> =>
processor: IngestPipelineProcessorResult
): processor is WithRequired<IngestPipelineProcessorResult, 'doc' | 'tag'> =>
processor.status === 'success' && !!processor.tag;

const isSkippedProcessor = (
processor: IngestPipelineSimulation
// @ts-expect-error Looks like the IngestPipelineSimulation.status is not typed correctly and misses the 'skipped' status
): processor is WithRequired<IngestPipelineSimulation, 'tag'> => processor.status === 'skipped';
processor: IngestPipelineProcessorResult
): processor is WithRequired<IngestPipelineProcessorResult, 'tag'> =>
processor.status === 'skipped';

const isMappingFailure = (entry: SimulateIngestSimulateIngestDocumentResult) =>
entry.doc?.error?.type === 'document_parsing_exception';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export const useIngestionRatePerTier = ({
const countByTier = indices.buckets.reduce((tiers, index) => {
const explain = ilmExplain.indices[index.key];
const tier =
explain.managed && explain.phase in ilmPhases
explain.managed && explain.phase && explain.phase in ilmPhases
? (explain.phase as PhaseNameWithoutDelete)
: fallbackTier;
tiers[tier] = (tiers[tier] ?? 0) + index.doc_count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* 2.0.
*/

import { AnalysisTokenFilter } from '@elastic/elasticsearch/lib/api/types';
import { AnalysisTokenFilter, AnalysisStopWords } from '@elastic/elasticsearch/lib/api/types';

interface LanguageDataEntry {
custom_filter_definitions?: object;
name: string;
stemmer: string;
stop_words: string;
stop_words: AnalysisStopWords;
postpended_filters?: string[];
prepended_filters?: string[];
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2141,10 +2141,10 @@
"@elastic/transport" "^8.3.1"
tslib "^2.4.0"

"@elastic/elasticsearch@9.0.1":
version "9.0.1"
resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-9.0.1.tgz#366320bd71bc5f3af22601194ddd973da9bac92e"
integrity sha512-V/Hj/ePRiC6H8vOQF4GfOGIUFjYyA2C1Je6qKBD20AShmxqkaTRAQSvia4tvLobHqjrljUzb6khfhDuPrb6E8g==
"@elastic/elasticsearch@9.0.2":
version "9.0.2"
resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-9.0.2.tgz#66fb8465fdeabb0c1174d3c48c0a2d5ad5d177c4"
integrity sha512-uKA0PuPSND3OhHH9UFqnKZfxifAg/8mQW4VnrQ+sUtusTbPhGuErs5NeWCPyd/RLgruBWBmLSv1zzEv5GS+UnA==
dependencies:
"@elastic/transport" "^9.0.1"
apache-arrow "18.x - 19.x"
Expand Down