try to fix erroneous qt restriction

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306711 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2012-03-29 04:33:54 +00:00
parent 93522a23fd
commit a9f2dbec17
2 changed files with 4 additions and 3 deletions

View File

@ -1543,8 +1543,9 @@ public final class SolrCore implements SolrInfoMBean {
toLog.add("path", req.getContext().get("path"));
toLog.add("params", "{" + req.getParamString() + "}");
if (req.getParams().getBool(ShardParams.IS_SHARD,false) && !(handler instanceof SearchHandler))
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,"isShard is only acceptable with search handlers");
// TODO: this doesn't seem to be working correctly and causes problems with the example server and distrib (for example /spell)
// if (req.getParams().getBool(ShardParams.IS_SHARD,false) && !(handler instanceof SearchHandler))
// throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,"isShard is only acceptable with search handlers");
handler.handleRequest(req,rsp);
setResponseHeaderValues(handler,req,rsp);

View File

@ -294,7 +294,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
try {
ignoreException("isShard is only acceptable");
query("q","*:*","shards.qt","/update","stream.body","<delete><query>*:*</query></delete>");
fail();
// fail();
} catch (SolrException e) {
//expected
}