Hey all. I'm new to the whole Elastic Stack and have been replacing some spaghetti-code in-house logging solutions recently. Something that was very easy when scripting a custom website was fetching and displaying different categories of logs in exactly the format I wanted, and while Elasticsearch has deftly handled a large amount of my organization's needs, some of our data is reported in a way that is completely incomprehensible on a document-by-document basis.
I tagged this post with "runtime" and "transforms" as runtime fields and dynamic transforms seem to be the key to what I need to accomplish, but I'm in waaay over my head and I'm really just looking for someone to point me in the right direction on how I should tackle this problem.
My goal is to group documents together based on a field whose value they all share, display them in time-order, and evaluate their values into readable information. Here is a mockup of what my ingested data looks like:
doc_0: {
internal_id: 200,
linked_ids: [1001, 1003],
linked_names: ["Object 1", "Object 3"],
enum_category: [8, 9],
enum_entry: [1, 2]
}
doc_1: {
internal_id: 200,
linked_ids: [1001, 1003, 1002],
linked_names: ["Object 1", "Object 3", "Object 2"],
enum_category: [3, 6, 9],
enum_entry: [1, 2, 3]
}
doc_2: {
internal_id: 200,
linked_ids: [1003, 1002],
linked_names: ["Object 3", "Object 2"],
enum_category: [-1, 6],
enum_entry: [-1, 8]
}
Here is what, ideally, the data would be formatted like for the end user, after querying for "internal_id : 200":
formatted_doc_0: {
Object 1 (1001): Category EIGHT entry ONE, # Enums are evaluated to human-readable labels and associated with objects at the same index in other array fields
Object 3 (1003): Category NINE entry TWO
},
formatted_doc_1: {
Object 1 (1001): Category THREE entry ONE,
Object 3 (1003): Category SIX entry TWO,
Object 2 (1002): Category NINE entry THREE # Objects maintain their order in the report despite nonsequential values
},
formatted_doc_2: {
Object 3 (1003): Invalid, # Validation of values must occur, however the value space, including invalid values, is defined and finite
Object 2 (1002): Category SIX entry EIGHT
}
I imagine this is a tall order, however given the vast number of configurable options in the Elastic Stack, I imagine there's some way to make this happen. I don't need working Painless code or anything, I just need a good shove towards what aspects of the stack I should be researching in order to make this happen. Even if the shuffling-around of the linked values isn't feasible, it's absolutely necessary that I can evaluate these enums into useful values in search results, and last time I tried to figure out how runtime fields work, I accidentally destroyed my testing data.
Thank you all for any assistance!