-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Fix application of runtime fields to index search. (#98718)
- A previous PR introduced a regression where only runtime fields would show up in the analytics wizard's source index preview. The code for transforms and analytics is a bit different so this regression didn't occur in transforms. - This PR fixes the problem and cleans up use_index_data.ts for the analytics wizard to remove some duplicate code to determine runtime field mappings. - Async fetch functions have been refactored to named function expressions and moved inside their corresponding useEffect calls (this change caused most of the diff). - combinedRuntimeMappings has been moved to an outer useMemo so it doesn't have to be generated in multiple places. - getIndexData has been renamed to fetchIndexData to indicate it's an async call getting remote data and to be in line with the other function names.
- Loading branch information
Showing
1 changed file
with
121 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters