Query terms matrix generation- it will be a single row matrix in which we- When there is match in all term and query terms list -put 10*idf if tree is not selected (query is not expanded and word matched in original query). -put 5*idf if tree is selected and term matched is in the real query (query is expanded and word matched in original query). -put 1*idf if tree is selected and term matched is in the expanded query (query is expanded and word is not matched in original query). -Finally put 0 where there is mismatch in all term list and query terms list This variation in first 3 weights is to incorporate the importance of a term if it is matched in a query and doesn’t need to be expanded.