: I use it like this: : SolrParams params = req.getParams(); : String q = params.get(CommonParams.Q).trim(); : : The exception is from the second line if "q" is empty. : I can see "q.alt=*:*" in my defaults within params. : : So why is it not picking up "q.alt" if "q" is empty?
Youre talking about some sort of custom solr plugin that you have correct? when you are accessing a SolrParams object, there is nothing magic about "q" and "q.alt" -- params.get() will only return the value specified for the param name you ask about. The logic for using "q.alt" (aka: "DisMaxParams.ALTQ") if "q" doesn't exist in the params (or is blank) has always been a specific feature of the DisMaxQParser. So if you are suddenly getting an NPE when q is missing, perhaps the problem is that in your old configs there was a default "q" containing hte empty string, and now that's gone? -Hoss