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

137019 msuzuki: Search-340, added unit test to cover range start and end inclusive options


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137089 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2017-06-01 11:23:14 +00:00
parent 2a2fe5c59e
commit 1bdcba877f
3 changed files with 81 additions and 49 deletions

View File

@@ -359,16 +359,6 @@ public class ResultMapper
context = new SearchContext(solrResultSet.getLastIndexedTxId(), facets, facetResults, ffcs, spellCheckContext, searchRequestContext.includeRequest()?searchQuery:null);
return isNullContext(context)?null:context;
}
private boolean hasGroup(Map<String, Integer> facetQueries, SearchQuery searchQuery)
{
for (Entry<String, Integer> fq:facetQueries.entrySet())
{
Optional<FacetQuery> found = searchQuery.getFacetQueries().stream().filter(facetQuery -> fq.getKey().equals(facetQuery.getLabel())).findFirst();
return (found.isPresent() && found.get().getGroup() != null);
}
return false;
}
/**
* Builds a facet field from facet queries.
* @param facetQueries