mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged searchrep (5.2.1) to 5.2.N (5.2.1)
136808 gjames: SEARCH-339: Adding bucketInfo for intervals with consistent names git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137060 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -316,10 +316,10 @@ public class SolrJSONResultSet implements ResultSet, JSONResult
|
|||||||
String facetRangeCount = rangeCollection.getString(i+1);
|
String facetRangeCount = rangeCollection.getString(i+1);
|
||||||
String rangeTo = (i+2 < rangeCollection.length() ? rangeCollection.getString(i+2):end);
|
String rangeTo = (i+2 < rangeCollection.length() ? rangeCollection.getString(i+2):end);
|
||||||
String label = rangeFrom + " - " + rangeTo;
|
String label = rangeFrom + " - " + rangeTo;
|
||||||
rangeMap.put("label", label);
|
rangeMap.put(GenericFacetResponse.LABEL, label);
|
||||||
rangeMap.put("count", facetRangeCount);
|
rangeMap.put(GenericFacetResponse.COUNT, facetRangeCount);
|
||||||
rangeMap.put("from", rangeFrom);
|
rangeMap.put(GenericFacetResponse.START, rangeFrom);
|
||||||
rangeMap.put("to", rangeTo);
|
rangeMap.put(GenericFacetResponse.END, rangeTo);
|
||||||
buckets.add(rangeMap);
|
buckets.add(rangeMap);
|
||||||
}
|
}
|
||||||
facetRanges.put(fieldName, buckets);
|
facetRanges.put(fieldName, buckets);
|
||||||
|
@@ -58,14 +58,14 @@ public class GenericBucket
|
|||||||
this.facets = facets;
|
this.facets = facets;
|
||||||
|
|
||||||
}
|
}
|
||||||
public GenericBucket(String label, String filterQuery, Object display, Set<Metric> metrics, List<GenericFacetResponse> facets, Map<String, String> facetInfo)
|
public GenericBucket(String label, String filterQuery, Object display, Set<Metric> metrics, List<GenericFacetResponse> facets, Map<String, String> bucketInfo)
|
||||||
{
|
{
|
||||||
this.label = label;
|
this.label = label;
|
||||||
this.filterQuery = filterQuery;
|
this.filterQuery = filterQuery;
|
||||||
this.display = display;
|
this.display = display;
|
||||||
this.metrics = metrics;
|
this.metrics = metrics;
|
||||||
this.facets = facets;
|
this.facets = facets;
|
||||||
this.bucketInfo = facetInfo;
|
this.bucketInfo = bucketInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getFilterQuery()
|
public String getFilterQuery()
|
||||||
|
@@ -37,6 +37,13 @@ public class GenericFacetResponse
|
|||||||
private final String label;
|
private final String label;
|
||||||
private final List<GenericBucket> buckets;
|
private final List<GenericBucket> buckets;
|
||||||
|
|
||||||
|
public static final String LABEL = "label";
|
||||||
|
public static final String COUNT = "count";
|
||||||
|
public static final String START = "start";
|
||||||
|
public static final String END = "end";
|
||||||
|
public static final String START_INC = "startInclusive";
|
||||||
|
public static final String END_INC = "endInclusive";
|
||||||
|
|
||||||
public GenericFacetResponse(FACET_TYPE type, String label, List<GenericBucket> buckets)
|
public GenericFacetResponse(FACET_TYPE type, String label, List<GenericBucket> buckets)
|
||||||
{
|
{
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
Reference in New Issue
Block a user