From eeee868a4833ab372d43e0ee06e7c12b81df0959 Mon Sep 17 00:00:00 2001 From: "Srivastava, Manish" Date: Wed, 17 Aug 2016 21:17:36 -0400 Subject: [PATCH] added facet range collection --- .../data/solr/core/query/result/FacetQueryResult.java | 7 +++++++ .../data/solr/core/query/result/SolrResultPage.java | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/main/java/org/springframework/data/solr/core/query/result/FacetQueryResult.java b/src/main/java/org/springframework/data/solr/core/query/result/FacetQueryResult.java index 0a9180ca2..59b865e2c 100644 --- a/src/main/java/org/springframework/data/solr/core/query/result/FacetQueryResult.java +++ b/src/main/java/org/springframework/data/solr/core/query/result/FacetQueryResult.java @@ -27,6 +27,7 @@ * * @param * @author David Webb + * @author masrivas * @since 2.1.0 */ public interface FacetQueryResult { @@ -55,6 +56,12 @@ public interface FacetQueryResult { * @since 1.5 */ Page getRangeFacetResultPage(String fieldname); + + /** + * @return Collection holding faceting result pages + */ + Collection> getFacetRangeResultPages(); + /** * Get Range Facet results for a given field with given name diff --git a/src/main/java/org/springframework/data/solr/core/query/result/SolrResultPage.java b/src/main/java/org/springframework/data/solr/core/query/result/SolrResultPage.java index d58650102..35f0da023 100644 --- a/src/main/java/org/springframework/data/solr/core/query/result/SolrResultPage.java +++ b/src/main/java/org/springframework/data/solr/core/query/result/SolrResultPage.java @@ -41,6 +41,7 @@ * @author Christoph Strobl * @author Francisco Spaeth * @author David Webb + * @author masrivas */ public class SolrResultPage extends PageImpl implements FacetPage, HighlightPage, FacetAndHighlightPage, ScoredPage, GroupPage, StatsPage { @@ -283,4 +284,9 @@ public Map getFieldStatsResults() { return this.fieldStatsResults; } + @Override + public Collection> getFacetRangeResultPages() { + return Collections.unmodifiableCollection(this.facetRangeResultPages.values()); + } + }