Search Time Query Expansion

I want to implement a classic query expansion (Rocchio method for example) for

Basically what I need to do is to retrieve the term vectors of the top N
relevant documents given an original query, extract a list of terms based
on some criteria, and finally get enriched document results with a expanded
query. Surely I can do that by searching twice, but is there any better
solution that I can do it IN the ElasticSearch? Do you have any
suggestions about where and how I can implement it?


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