Merged searchbcr (5.2.1) to 5.2.N (5.2.1)

135431 gjames: SEARCH-339: A basic restapi for facet intevals


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@136077 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2017-03-24 13:13:17 +00:00
parent 29aecf23fe
commit 1d91a071e3
8 changed files with 218 additions and 30 deletions

View File

@@ -28,6 +28,7 @@ package org.alfresco.rest.api.search.model;
import org.alfresco.rest.framework.resource.parameters.Paging;
import org.alfresco.service.cmr.search.GeneralHighlightParameters;
import org.alfresco.service.cmr.search.IntervalParameters;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonProperty;
@@ -54,8 +55,9 @@ public class SearchQuery
private final Scope scope;
private final Limits limits;
private final GeneralHighlightParameters highlight;
private final IntervalParameters facetIntervals;
public static final SearchQuery EMPTY = new SearchQuery(null, null, null, null, null,null, null, null,null, null, null, null, null, null);
public static final SearchQuery EMPTY = new SearchQuery(null, null, null, null, null,null, null, null,null, null, null, null, null, null, null);
@JsonCreator
public SearchQuery(@JsonProperty("query") Query query,
@@ -71,7 +73,8 @@ public class SearchQuery
@JsonProperty("spellcheck") Spelling spellcheck,
@JsonProperty("scope") Scope scope,
@JsonProperty("limits")Limits limits,
@JsonProperty("highlight")GeneralHighlightParameters highlight)
@JsonProperty("highlight")GeneralHighlightParameters highlight,
@JsonProperty("facetIntervals")IntervalParameters facetIntervals)
{
this.query = query;
this.paging = paging;
@@ -87,6 +90,7 @@ public class SearchQuery
this.facetFields = facetFields;
this.limits = limits;
this.highlight = highlight;
this.facetIntervals = facetIntervals;
}
public Query getQuery()
@@ -152,6 +156,12 @@ public class SearchQuery
{
return highlight;
}
public IntervalParameters getFacetIntervals()
{
return facetIntervals;
}
public Limits getLimits()
{
return limits;