Refering to a specific _type in Kibana

(Arthur Y) #1

Hello all, hope you can help me.
Imagine I have an Elasticsearch index "sale-merged" and 2 different types (_traffic, _bi-merged) within one index. Types store simillar data and the mappings are amost the same, just _bi-merged has additional fields.

In ES I can run a query to specify from which _type to retrieve documents:
{ "query": { "match": { "_type": "traffic" } } }
But at the stage when I configure the index to be used by default in Kibana, I see only documents that are stored under _bi-merged type, but no documents in _traffic type -

The thing I want to achieve is to apply relation-database approach - where index is a database and _type is a table.
In the end, I need to be able to work with documents from both types in Kibana and Timelion

I would appreciate any feedback!

Modeling data relationships in ES and Kibana
(Mark Walkom) #2

I haven't seen this before, but does it persist if you refresh the index mappings in KB?

Why, what is the point? ES is not a database and chances are you will run into

(Arthur Y) #3

Well, we proceeded with perhaps not the best decision to build BI system on top of Elastic, and now this is more of a patching process.
Actually, the issue can be resolved if when configuring the index in Kibana, I set the time field that exists in the mapping of both types -
Thus, I can use the filter '-type "traffic"' to exlude documents of an another type, but does not seem very consistent -

Thanks for the article @warkolm, I guess in our use case, type use will be convinient.

(system) #4