I use "OR" query in sphinx, now I want to get the source words of the results. For example, I search "apple | banana | pear" to get those docs where these fruit words exist. Usually, I will get a list of doc(id) which contain these words and sorted according to some strategy.
The question is that, for each doc returned(top 10 results), I also want to know what words are exactly contained in the doc. In other words, when I get doc#3 in the list, I also want to know that "apple" and "pear" exist in this doc. I use python API for sphinx now and is there any way to achieve this efficiently? In order to simplify the problem, I can use different numbers instead of the fruits.