Query formulation for handling negation in information retrieval systems