I found only 2 settings related to _source, one under General, the metaFields which is a text field with the following values: _source, _id, _index, _score
I removed _source from this list, but no change.
The other setting is under Discover, discover:searchFieldsFromSource, which was turned off, so I would expect Kibana to get the fields using the Fields API.
If there are any other setting, the description is not clear enough.
Since I'm using daily indices, I needed to rollback because we need to be able to see the data on Discover and we do not need the _source field for a couple of indices.
What else should I check to be able to remove the _source fields from some indices but still see them on Discover?
Everything else worked, I was able to filter using values on the fields, the alerts on the data worked and the dashboards also worked, but We couldn't see the data on Discover.
The following screenshots can give an example of what we had.
If I'm not wrong, synthetic source would reconstruct the source on the fly, right?
Also, I think this is still imited to TSDB indices, which is not the case, I'm also have some mappings that doesn't work with synthetic if I'm not wrong.
Should I open an issue anywhere or just wait to see if you can get more information about this?
Synthetic _source is Generally Available only for TSDB indices (indices that have index.mode set to time_series ). For other indices synthetic _source is in technical preview. Features in technical preview may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
I have a question in... on expected Discover behavior with _source disabled but feel free to open a ticket.
The fields API in ES uses the _source field under the hood, so disabling _source will make it so the fields aren't returned (even when using the fields API)
The fields option returns values in the way that matches how Elasticsearch indexes them. For standard fields, this means that the fields option looks in _source to find the values, then parses and formats them using the mappings. Selected fields that can’t be found in _source are skipped.
Stephen:
Huh.... so that is totally not what I expected in Discover... When I see the word fields I always think about the actual fields, not the _source... I (and I suspect others) did not read the docs closely I always thought the values were actually pulled from the doc_values etc..So I guess I am hearing that Discover is working as designed, but it is pretty much not of much value if _source is disabled? I guess I was basically expecting Discover to work like it does with Synthetic _source
Engineering:
Right, I don't think Discover supports _source being disabled. We should definitely improve the experience to at least let you know something is wrong
Read fields from _source
When enabled will load documents directly from _source. This is soon going to be deprecated. When disabled, will retrieve fields via the new Fields API in the high-level search service.
Reading this I assumed that the Fields API is unrelated to the presence of the _source field, which seems not to be the case from what you shared.
But the main issue I think is that the documentation about disabling the _source field does not mention Kibana.
I think that this can be improved adding an information that the _source field is required to show the data on Kibana Discover and the user will decide from this.
As a similar example, a couple of time ago I discovered that disabling expensive queries on Elasticsearch breaks Kibana Alerting system, and this was also not documented at the time.
So, I will need to have _source enabled and find other ways to save some space.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.