[Discover] [Reporting] Discover and CSV export handle conflicting object
and flattened
field leaf values differently
#182298
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Discover
Discover Application
Feature:Reporting
Reporting (PDF, CSV, ..) feature
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:needs-research
This issue requires some research before it can be worked on or estimated
Team:DataDiscovery
Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects
Summary
This issue arises when dealing with a data view that has a conflicting field of types
object
andflattened
.Normally in Discover, it's only possible to add the entire
flattened
field as a column, but not its properties since they aren't indexed as separate fields:But it's the opposite for
object
fields, where each property is flattened and indexed separately, so only the leaf values can be added as columns:When there's a conflict like this, Discover doesn't know which behaviour is correct, so it highlights the field as conflicting in the field list and allows adding both the root and leaf values (which it labels as multi fields) as columns:
But the way it handles them in the grid is different between documents. For the document where
user
is aflattened
field, it displays the full object for the root value column and empty for the leaf value columns. For the document whereuser
is anobject
field, it displays empty for the root value column and the property values for leaf value columns:Even more confusing is that when exporting a CSV with the
user.first
anduser.last
columns in the table, the CSV includes values for both the document with theflattened
field and the document with theobject
field:Solution
It's not clear which behaviour is correct or incorrect in this situation or how to resolve it, but there seem to be a few options:
flattened
fields in general support adding leaf values as columns, otherwise the conflicting field type would have better support for leaf values thanflattened
fields directly.Reproduction steps
The above scenario can be reproduced by running the following commands in console, creating a
flat-conflict-*
data view, and navigating to Discover:The text was updated successfully, but these errors were encountered: