SolrQuery should override ModifiableSolrParams methods that return this and
return SolrQuery
--------------------------------------------------------------------------------------------
Key: SOLR-2744
URL: https://issues.apache.org/jira/browse/SOLR-2744
Project: Solr
Issue Type: Improvement
Reporter: Willis Blackburn
Because the methods of ModifiableSolrParams that return "this" are declared to
return ModifiableSolrParams, as soon as the code calls one of those methods on
an object that is in fact a SolrQuery, it cannot chain any more
SolrQuery-specific methods.
Java allows covariant return types, so a simple solution is to redefine those
methods in SolrQuery to return SolrQuery. For example:
{noformat}
public SolrQuery add( String name, String ... val ) {
super.add(name, val);
return this;
}
{noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]