Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FacetLimit -1 on FacetOptions throws Exception [DATASOLR-305] #427

Closed
spring-projects-issues opened this issue May 9, 2016 · 0 comments
Closed

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented May 9, 2016

Bram Van Impe opened DATASOLR-305 and commented

Setting FacetLimit to -1 on FacetOptions:

return new FacetOptions()
    .addFacetOnField(...)
    ...
    .setFacetLimit(-1);

Throws the following Exception when the query is formed:

java.lang.IllegalArgumentException: Illegal Capacity: -1
	at java.util.ArrayList.<init>(Unknown Source) ~[?:1.8.0_65]
	at org.springframework.data.solr.core.ResultHelper.convertFacetQueryResponseToFacetPageMap(ResultHelper.java:125) ~[spring-data-solr-2.0.1.RELEASE.jar:?]
	at org.springframework.data.solr.core.SolrTemplate.queryForFacetPage(SolrTemplate.java:418) ~[spring-data-solr-2.0.1.RELEASE.jar:?]
	at org.springframework.data.solr.core.SolrTemplate.queryForFacetPage(SolrTemplate.java:403) ~[spring-data-solr-2.0.1.RELEASE.jar:?]
	...

Affects: 2.0.1 (Hopper SR1)

Referenced from: commits 91faea8, 567146b, a247173

Backported to: 2.0.2 (Hopper SR2), 1.5.5 (Gosling SR5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants