Base class for query expansion.

The code will not compile currently as I have only written the base class as of now. Have yet to use it at other places. But , please do let me know what you think of the base class for query expansion before I move ahead.