List of usage examples for org.apache.solr.search ReRankQParserPlugin RERANK_QUERY
String RERANK_QUERY
To view the source code for org.apache.solr.search ReRankQParserPlugin RERANK_QUERY.
Click Source Link
From source file:org.tallison.solr.search.QueryEqualityTest.java
License:Apache License
public void testReRankQuery() throws Exception { final String defType = ReRankQParserPlugin.NAME; SolrQueryRequest req = req("q", "*:*", "rqq", "{!edismax}hello", "rdocs", "20", "rweight", "2", "rows", "10", "start", "0"); try {//from ww w. j a v a2 s . co m assertQueryEquals(defType, req, "{!" + defType + " " + ReRankQParserPlugin.RERANK_QUERY + "=$rqq " + ReRankQParserPlugin.RERANK_DOCS + "=$rdocs " + ReRankQParserPlugin.RERANK_WEIGHT + "=$rweight}", "{!" + defType + " " + ReRankQParserPlugin.RERANK_QUERY + "=$rqq " + ReRankQParserPlugin.RERANK_DOCS + "=20 " + ReRankQParserPlugin.RERANK_WEIGHT + "=2}"); } finally { req.close(); } req = req("qq", "*:*", "rqq", "{!edismax}hello", "rdocs", "20", "rweight", "2", "rows", "100", "start", "50"); try { assertQueryEquals(defType, req, "{!" + defType + " mainQuery=$qq " + ReRankQParserPlugin.RERANK_QUERY + "=$rqq " + ReRankQParserPlugin.RERANK_DOCS + "=$rdocs " + ReRankQParserPlugin.RERANK_WEIGHT + "=$rweight}", "{!" + defType + " mainQuery=$qq " + ReRankQParserPlugin.RERANK_QUERY + "=$rqq " + ReRankQParserPlugin.RERANK_DOCS + "=20 " + ReRankQParserPlugin.RERANK_WEIGHT + "=2}"); } finally { req.close(); } }