From a9f2dbec17dfa917c7ece6770fbe20f0a0506a35 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 29 Mar 2012 04:33:54 +0000 Subject: [PATCH] try to fix erroneous qt restriction git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1306711 13f79535-47bb-0310-9956-ffa450edef68 --- solr/core/src/java/org/apache/solr/core/SolrCore.java | 5 +++-- .../core/src/test/org/apache/solr/TestDistributedSearch.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java index 238a6f6f629..d7067902c4a 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java @@ -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); diff --git a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java index 8c5e56f29a8..27958ae3442 100755 --- a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java +++ b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java @@ -294,7 +294,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase { try { ignoreException("isShard is only acceptable"); query("q","*:*","shards.qt","/update","stream.body","*:*"); - fail(); + // fail(); } catch (SolrException e) { //expected }