A rule-based query rewriter for Java-based search engines