On 8/23/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:
+ // TODO: We have some constants in SolrQueryRequestBase, and some in
CommonParams...
...i vote for pulling them out of SolrQueryRequestBase ... i would go so
far as to recommend deprecating the named accessors like getQueryString,
getLimit, and getStart -- the only params that should be treated special
are "qt" and "wt". As for where they should live, ... I'm thinking
CommonParams is headed the way of the Dodo, SolrParams seems like the
right place to me.
I think SolrParams is fine, I'll move them there unless someone has a
better idea.
3) in this method, would it be better to let getOriginalParams() return
null? .. as is information (the lack of params when the request was
constructed) can be lost if setParams is called more then once...
+ public void setParams(SolrParams params) {
+ if (this.origParams==null) this.origParams=params;
+ this.params = params;
+ }
The original lack of params wasn't meaningful before (see
LocalSolrQuery constructor which called the superclass constructor
first (as it must) and then created the parameters and called
setParams()). I can refactor out the parameter construction into a
static method so it can be passed to the superclass constructor
though.
-Yonik