I am planning to use ES for storing tracebacks of exceptions such as:
[a/b/c/d/func/line, e/f/g/h/func/line, i/j/k/l/func/line]
Now, for any incoming tracebacks, I want to rank the results based on which document matches call chain the most and also order matters (starting from reverse because doesn't matter if top half of call chain matches and rest doesn't)
So I have thought of something and I wanted to find out if there is something better I can use.
Store tracebacks as string and use match_phrase query like:
"a/b/c/d/func/line, e/f/g/h/func/line, i/j/k/l/func/line"
If that doesn't return anything, look for:
and so on..
This should make sure that docs with longest call chain match are at top.
But this will be computationally expensive on ES.
I saw this thread suggesting to implement my own similarity model.
I am still a newbie to ES so I think that will take me a lot of time.
Is there anything out of the box that can help me?
Or may be reduce the computation on ES side by something like stop on first match?