[
https://issues.apache.org/jira/browse/SOLR-602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Noble Paul updated SOLR-602:
----------------------------
Attachment: SOLR-602.patch
all setter/add methods do a return this
> Method chaining in SolrQuery
> ----------------------------
>
> Key: SOLR-602
> URL: https://issues.apache.org/jira/browse/SOLR-602
> Project: Solr
> Issue Type: Improvement
> Components: clients - java
> Affects Versions: 1.3
> Reporter: Noble Paul
> Priority: Trivial
> Fix For: 1.3
>
> Attachments: SOLR-602.patch
>
>
> SolrQuery has umpteen no:of setter methods and one needs to invoke a
> lot of them before sending the query. Can we make the 'setter' methods
> return 'this' so that users can chain the method calls and make the
> client code simpler.
> as follows
> {code:java}
> SolrQuery solrQuery = new SolrQuery().
> setQuery("ipod").
> setFacet(true).
> setFacetMinCount(1).
> setFacetLimit(8).
> addFacetField("category").
> addFacetField("inStock");
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.