By adjusting the term weights for document length, bigger documents will be less likely to populate the relevant term dictionary. As a consequence, the said term dictionary will better represent the overall corpus. Whether you use relative TF or absolute TF does not matter. Actually, the most known term weight used for information retrieval is TFxIDF, which will boost the TF of rarer terms.
Perform the document length adjustment on the unpivoted bag of words, where you have a single term weight column. A single Math node will do, after you've extracted the number of terms using Document Data Extractor (on the cleaned documents). After this step, proceed with generating the term dictionary and creating the document vector based on the dictionary. Then apply the same preprocessing on the query document(s), except that any words not present in the term dictionary should be filtered out.