* [TSVB] Refactor top-hit aggregation to work with fields instead of _source
* Allow select date strings for top_hit aggregation in table, metric, and markdown
* Fix agg_with handling for top_hit and add some tests
* Refactor get_agg_value and fix type check for _tsvb_chart
* Refactor top_hit.js
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* add `isExportable` SO export API
* add warning when export contains excluded objects
* add FTR test
* fix API integration assertions
* lint
* fix assertions again
* doc
* update generated doc
* fix esarchiver paths
* use maps instead of objects
* SavedObjectsExportablePredicate is no longer async
* more docs
* generated doc
* use info instead of warning when export contains excluded objects
* try/catch on isExportable call and add exclusion reason
* add FTR test for errored objects
* log error if isExportable throws
In 7.x, when saved objects point to an index and not an alias it will
assume it's pre-6.8 and perform a legacy migration. This causes issues
with the removal of oss builds. This update prevents that from happening
by using an alias.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* some typos
* implement an alternative client-side migration algorithm
required to enforce idempotent id generation for SO
* update tests
* lol
* remove unnecessary param from request generic
* remove unused parameter
* optimize search when quierying SO for migration
* fix wrong type in fixtures
* try shard_doc asc
* add an integration test
* cleanup
* track_total_hits: false to improve perf
* add happy path test for transformDocs action
* remove unused types
* fix wrong typing
* add cleanup phase
* add an integration test for cleanup phase
* add unit-tests for cleanup function
* address comments
* Fix functional test
* set defaultIndex before each test. otherwise it is deleted in the first test file during cleanup phase
* sourceIndex: Option.some<> for consistency
* Revert "set defaultIndex before each test. otherwise it is deleted in the first test file during cleanup phase"
This reverts commit a128d7b7c0.
* address comments from Pierre
* fix test
* Revert "fix test"
This reverts commit 97315b6dc2.
* revert min convert version back to 8.0
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
* Support for number, date and IP ranges
* Update tests
* Ranges don't work with range agg
* Fix test case
* Allow Discover to create range filters
* Supports ranges in Visualize, KQL, remove Lens support
* Fix test mappings
* Bring back field cache to work around bug
* Fix some tests
* Fix test expectation
* Respond to review comments
* Fix type error
* Remove added sample data
* Fix api_docs
* Fix test
* Add search source to example plugin.
* Add uiSetting for fields API.
* Update SearchSource to support fields API.
* [PoC] reading from the fields API in Discover
* Add N fields as a default column
* Make fields column non-removeable
* Do not add 'fields' to state
* Remove fields from app state and read from source when needed
* Remove fields column if a new column is added
* Add search source to example plugin.
* Add uiSetting for fields API.
* Update SearchSource to support fields API.
* Improve error handling in search examples plugin.
* Add unit tests for legacy behavior.
* Remove uiSettings feature flag; add fieldsFromSource config.
* Rewrite flatten() based on final API design.
* Update example app based on final API design.
* Update maps app to use legacy fieldsFromSource.
* Update Discover to use legacy fieldsFromSource.
* Rename source filters to field filters.
* Address feedback.
* Update generated docs.
* Update maps functional test.
* Formatting fields column similar to _source
* Moving logic for using search API to updating search source
* Fix small merge error
* Move useSource switch to Discover section of advanced settings
* Do not use fields and source at the same time
* Remove unmapped fields switch
* Add basic support for grouping multifields
* Remove output.txt
* Fix some merge leftovers
* Fix some merge leftovers
* Fix merge errors
* Fix typescript errors and update nested fields logic
* Add a unit test
* Fixing field formats
* Fix multifield selection logic
* Request all fields from source
* Fix eslint
* Fix default columns when switching between _source and fields
* More unit tests
* Update API changes
* Add unit test for discover field details footer
* Remove unused file
* Remove fields formatting from index pattern
* Remove unnecessary check
* Addressing design comments
* Fixing fields column display and renaming it to Document
* Adding more unit tests
* Adding a missing check for useNewFieldsAPI; minor fixes
* Fixing typescript error
* Remove unnecessary console statement
* Add missing prop
* Fixing import order
* Adding functional test to test fields API
* [Functional test] Clean up in after
* Fixing context app
* Addressing PR comments
* Add support for unmapped fields
* Add data migration
* Add toggle unmapped fields logic
* Adding more unit tests
* Some cleanup
* More unit tests
* Fixing failing snapshot
* Add tooltip next to unmapped switch
* Add functional test for the feature
* Fixing a typo in a functional test
* Refetch data when unmapped fields value changes
* Updating mapping
* Support for fields API in search embeddable
* Addressing PR comments
* Fix failing unit test
* Updating the text
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [WIP][Vega] Use mapbox instead of leaflet #78395
add MapServiceSettings class
some work
add tms_raster_layer
add LayerParameters type
clenup view.ts
some cleeanup
fix grammar
some refactoring and add attribution control
Some refactoring
Add some validation for zoom settings and destroy handler
Some refactoring
some work
fix bundle size
Move getZoomSettings to the separate file
update licence
some work
move logger to createViewConfig
add throttling for updating vega layer
* move EMSClient to a separate bundle
* [unit testing] add tests for validation_helper.ts
* [Bundle optimization] lazy loading of '@elastic/ems-client' only if user open map layer
* [Map] fix cursor: crosshair -> auto
* [unit testing] add tests for tms_raster_layer.test
* [unit testing] add tests for vega_layer.ts
* VSI related code was moved into a separate file / unit tests were added
* Add functional test for vega map
* [unit testing] add tests for map_service_setting.ts
* Add unload in function test and delete some unneeded code from test
* road_map -> road_map_desaturated
* [unit testing] add more tests for map_service_settings.test.ts
* Add unit tests for view.ts
* Fix some remarks
* Fix unit tests
* remove tms_tile_layers enum
* [unit testing] fix map_service_settings.test.ts
* Fix unit test for view.ts
* Fix some comments
* Fix type check
* Fix CI
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add search source to example plugin.
* Add uiSetting for fields API.
* Update SearchSource to support fields API.
* [PoC] reading from the fields API in Discover
* Add N fields as a default column
* Make fields column non-removeable
* Do not add 'fields' to state
* Remove fields from app state and read from source when needed
* Remove fields column if a new column is added
* Add search source to example plugin.
* Add uiSetting for fields API.
* Update SearchSource to support fields API.
* Improve error handling in search examples plugin.
* Add unit tests for legacy behavior.
* Remove uiSettings feature flag; add fieldsFromSource config.
* Rewrite flatten() based on final API design.
* Update example app based on final API design.
* Update maps app to use legacy fieldsFromSource.
* Update Discover to use legacy fieldsFromSource.
* Rename source filters to field filters.
* Address feedback.
* Update generated docs.
* Update maps functional test.
* Formatting fields column similar to _source
* Moving logic for using search API to updating search source
* Fix small merge error
* Move useSource switch to Discover section of advanced settings
* Do not use fields and source at the same time
* Remove unmapped fields switch
* Add basic support for grouping multifields
* Remove output.txt
* Fix some merge leftovers
* Fix some merge leftovers
* Fix merge errors
* Fix typescript errors and update nested fields logic
* Add a unit test
* Fixing field formats
* Fix multifield selection logic
* Request all fields from source
* Fix eslint
* Fix default columns when switching between _source and fields
* More unit tests
* Update API changes
* Add unit test for discover field details footer
* Remove unused file
* Remove fields formatting from index pattern
* Remove unnecessary check
* Addressing design comments
* Fixing fields column display and renaming it to Document
* Adding more unit tests
* Adding a missing check for useNewFieldsAPI; minor fixes
* Fixing typescript error
* Remove unnecessary console statement
* Add missing prop
* Fixing import order
* Adding functional test to test fields API
* [Functional test] Clean up in after
* Fixing context app
* Addressing PR comments
* Updating failed snapshot
* Addressing PR comments
* Fixing i18n translations, updating type
* Addressing PR comments
* Updating a functional test
* Add a separate functional test for fields API
* Read fields from source in a functional test
* Skip buggy test
* Use default behavior in functional tests
* Fixing remaining failing tests
* Fixing date-nanos test
* Updating FLS test
* Fixing yet another functional test
* Skipping non-relevant tests
* Fixing more tests
* Update stub import in test
* Fix import
* Fix invalid import
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix bug #7189
* typo
* Test adjustments
* wait for load complete
* Fine tune test
* Update src/plugins/data/public/query/filter_manager/lib/generate_filters.ts
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
* Fix filtering by an array of nulls
Allow filtering by a non existing field in the doc
simplify flatten hit logic
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* add error if filter index pattern is gone
* docs change - why?
* Fix i18n
* Added a functional test for broken filters (field + index pattern)
* Clarify readme
* Moved readme
* New warning status
* Remove getAll
* git pull upstream master
* Fix translation files
* Fix merge
* added filterbar texts
* disabled correction
* Disable check in maps test until #64861 is resolved
* Fix tests, warning state is not disabled.
* Adjust warning filter - ignore filters from "foreign" index pattern, that are still applicable
* Add an additional unrelaeted filter test
* Update src/plugins/data/public/ui/filter_bar/_global_filter_item.scss
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
* Update src/plugins/data/public/ui/filter_bar/_global_filter_item.scss
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
* Fixed test data
* Revert mapping
* Update data with missing test
* Update test to match data
* Code review
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* create field for references and add comments
* add FTR test
* remove comments
* address comments
* use real reference in dataset and assert against it.
* Auto interval on date histogram is getting displayed as timestamp per 0 milliseconds when x-axis bucket is collapsed
Closes#57822
* Fixed incorrect interval label displaying while scaling the chart.
* Updated agg.test.tsx snapshot
* Got rid of context and refactored agg hooks
* Fixed agg.type.name check
* Added functional tests to cover the date histogram interval editing
* Fixed some expected values in tests
* Updated some test cases
* Added a new visualization to visualize archive
* Added testSubjects service to replace find where possible
* Updated tests to match updated behavior
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Catch invalid calendar exception
* Use isValidEsInterval directly
* Show field error message right away
* Fix for the case 2w
* Update time_interval.tsx
* Restructure validation
* Rename fn to isValidCalendarInterval
* Refactoring
* Update time_interval.tsx
* Add functional tests
* Add functional tests for interval
* Update _area_chart.js
* Don't show error when value is empty
* Use error message from InvalidEsCalendarIntervalError
* Update _area_chart.js
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* just a demo of function to return saved object table elements
* fix esArchive data, extend import objects test case for relationships
* improved data-test-subjs
* update snapshot for jest test
* unskip other half of the tests
* removed commented-out code
* use new findByTestSubject methods
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR adds a new syntax to KQL for querying nested fields.
Nested fields can be queried in two different ways:
Parts of the query may only match a single nested doc (bool inside nested). This is what most people want when querying on a nested field.
Parts of the query may match different nested docs (nested inside bool). This is how a regular object field works but nested fields can be queried in the same way. Although generally less useful, there are occasions where one might want to query a nested field in this way.
The new KQL syntax supports both.
* Implement getSortForSearchSource for add-on of 'numeric_type' to the ES request. Then sorting on a field that can be of date or date_nanos type works correctly
* Add functional test
Introduces "saved queries". Saved queries are a new saved object type similar to saved searches but more limited in scope. They allow users to store the the query string in the query bar and optionally the set of filters and timefilter in order to reload them anywhere a query is expected: Discover, Visualize, Dashboard, anywhere that uses our full SearchBar component.