Library for merging term occurrencies in information retrieval for structured queries on unstructured text