diff --git a/solr/core/src/java/org/apache/solr/search/ReturnFields.java b/solr/core/src/java/org/apache/solr/search/ReturnFields.java index a6db404cb30..e5e6df75e8e 100644 --- a/solr/core/src/java/org/apache/solr/search/ReturnFields.java +++ b/solr/core/src/java/org/apache/solr/search/ReturnFields.java @@ -118,11 +118,6 @@ public class ReturnFields augmenters.addTransformer( new RenameFieldsTransformer( rename ) ); } - // Legacy behavior: "score" == "*,score" - if( fields.size() == 1 && _wantsScore && augmenters.size() == 1 && globs.isEmpty() ) { - _wantsAllFields = true; - } - if( !_wantsAllFields ) { if( !globs.isEmpty() ) { // TODO??? need to fill up the fields with matching field names in the index diff --git a/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java b/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java index 6ab552f49a6..2ae4df02891 100644 --- a/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java +++ b/solr/core/src/test/org/apache/solr/ConvertedLegacyTest.java @@ -1127,7 +1127,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 { // test addition of score field args = new HashMap(); - args.put("fl","score "); + args.put("fl","score,* "); req = new LocalSolrQueryRequest(h.getCore(), "id:44", "standard", 0, 10, args); assertQ(req @@ -1190,7 +1190,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 { ,"//@maxScore = //doc/float[@name='score']" ); args = new HashMap(); - args.put("fl","score"); + args.put("fl","*,score"); args.put("defType","lucenePlusSort"); req = new LocalSolrQueryRequest(h.getCore(), "id:44;id desc;", "standard", 0, 0 , args); diff --git a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java index 3ea5ed6c0d7..4a88a35e7bb 100755 --- a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java +++ b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java @@ -128,7 +128,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase { query("q","*:*", "sort","{!func}testfunc(add("+i1+",5))"+" desc"); query("q","*:*", "sort",i1+" asc"); query("q","*:*", "sort",i1+" desc", "fl","*,score"); - query("q","*:*", "sort","n_tl1 asc", "fl","score"); // test legacy behavior - "score"=="*,score" + query("q","*:*", "sort","n_tl1 asc", "fl","*,score"); query("q","*:*", "sort","n_tl1 desc"); handle.put("maxScore", SKIPVAL); query("q","{!func}"+i1);// does not expect maxScore. So if it comes ,ignore it. JavaBinCodec.writeSolrDocumentList() diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java index 4a5609ee633..5a2880d81dd 100644 --- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java @@ -166,7 +166,7 @@ public class BasicDistributedZkTest extends AbstractDistributedZkTestCase { query("q","*:*", "sort",i1+" desc"); query("q","*:*", "sort",i1+" asc"); query("q","*:*", "sort",i1+" desc", "fl","*,score"); - query("q","*:*", "sort","n_tl1 asc", "fl","score"); // test legacy behavior - "score"=="*,score" + query("q","*:*", "sort","n_tl1 asc", "fl","*,score"); query("q","*:*", "sort","n_tl1 desc"); handle.put("maxScore", SKIPVAL); query("q","{!func}"+i1);// does not expect maxScore. So if it comes ,ignore it. JavaBinCodec.writeSolrDocumentList() diff --git a/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java b/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java index ce069b25389..7e458852190 100644 --- a/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java +++ b/solr/core/src/test/org/apache/solr/search/TestPseudoReturnFields.java @@ -42,7 +42,7 @@ public class TestPseudoReturnFields extends SolrTestCaseJ4 { * values of the fl param that mean all real fields and score */ private static String[] SCORE_AND_REAL_FIELDS = new String[] { - "score", "score,*", "*,score" + "score,*", "*,score" }; @BeforeClass