SOLR-591 -- Changed Solrj default value for facet.sort to true

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@682587 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2008-08-05 05:43:59 +00:00
parent 925cefcc46
commit 25a88db881
3 changed files with 10 additions and 1 deletions

View File

@ -568,6 +568,8 @@ Other Changes
Lucene-Java (hossman)
17. SOLR-645: Refactored SimpleFacetsTest (Lars Kotthoff via hossman)
18. SOLR-591: Changed Solrj default value for facet.sort to true (Lars Kotthoff via Shalin)
Build
1. SOLR-411. Changed the names of the Solr JARs to use the defacto standard JAR names based on

View File

@ -194,7 +194,7 @@ public class SolrQuery extends ModifiableSolrParams
* @return facet sort or default of true
*/
public boolean getFacetSort() {
return this.getBool(FacetParams.FACET_SORT, false);
return this.getBool(FacetParams.FACET_SORT, true);
}
/** set facet sort

View File

@ -89,4 +89,11 @@ public class SolrQueryTest extends TestCase {
System.out.println(q);
}
public void testFacetSort() {
SolrQuery q = new SolrQuery("dog");
assertTrue("expected default value to be true", q.getFacetSort());
q.setFacetSort(false);
assertFalse("expected set value to be false", q.getFacetSort());
}
}