Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

adding a getSort() method, as suggested by bug 30242, but unlike in the bug report it's called getSort(), not getSortFields(), as the set method is also called setSort(...) PR: 30242

Daniel Naber4288bbe64388
diff --git a/src/java/org/apache/lucene/search/Sort.java b/src/java/org/apache/lucene/search/Sort.java
index 3a7095f114d..d3b35340833 100644
--- a/src/java/org/apache/lucene/search/Sort.java
+++ b/src/java/org/apache/lucene/search/Sort.java
@@ -202,6 +202,14 @@ implements Serializable {
public void setSort(SortField[] fields) {
this.fields = fields;
}
+
+ /**
+ * Representation of the sort criteria.
+ * @return Array of SortField objects used in this sort criteria
+ */
+ public SortField[] getSort() {
+ return fields;
+ }
public String toString() {
StringBuffer buffer = new StringBuffer();