Calculate term co-occurrence matrix

(Aeneas Wiener) #1


Is there an efficient way to calculate a term co-occurrence matrix
(i.e. a matrix showing how often a pair of terms of occurred in the same

I tried fetching a list of relevant terms using a terms aggregation, and
then I have two nested loops to calculate co-occurence of these terms via a span
near query
Is there a faster way to do this in elasticsearch?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit

(Hossein Nasr Esfahani) #2

Hi Aeneas,

I was wonder if you have found any efficient way to solve this problem or not?


(Mark Harwood) #3


(system) #4