Rule-based search query rewriter for Java-based search engines