SOLR-2712: expecting fl=score to return all fields removed in trunk

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1298690 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2012-03-09 02:07:23 +00:00
parent d17cfcff27
commit dbb3a8151f
5 changed files with 5 additions and 10 deletions

View File

@ -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

View File

@ -1127,7 +1127,7 @@ public class ConvertedLegacyTest extends SolrTestCaseJ4 {
// test addition of score field
args = new HashMap<String,String>();
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<String,String>();
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);

View File

@ -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()

View File

@ -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()

View File

@ -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