Skip to content

Commit

Permalink
Merge branch 'EMC-36-remove-solr-limit' into 'develop'
Browse files Browse the repository at this point in the history
Facet queries now have no limit

Closes EMC-36

See merge request eip/catalogue!748
  • Loading branch information
hkhan38 committed Oct 28, 2024
2 parents 0da0625 + adf245b commit 2a04cbd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ private void setFacetFilters(SolrQuery query){
private void setFacetFields(SolrQuery query){
query.setFacet(true);
query.setFacetMinCount(1);
query.setFacetLimit(-1);
query.setFacetSort("index");
facets.forEach((facet) ->
query.addFacetField(facet.getFieldName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ public void buildQueryWithNoExtraParameters() {
assertThat(solrQuery.getRows(), is(equalTo(DEFAULT_ROWS)));
assertThat(solrQuery.getFacetMinCount(), is(equalTo(1)));
assertThat(solrQuery.getSorts().get(0).getItem().substring(0, 6), is(equalTo("random")));
assertThat("Facets should have a default limit of -1 (ie infinite)", solrQuery.getFacetLimit(), equalTo(-1));
}

@Test
Expand Down

0 comments on commit 2a04cbd

Please sign in to comment.