Dan, this doesn't really have anything to do with your filter on the
Status field except that it causes different documents to be selected.
The root cause is a schema mismatch with your index.
A string field (or so the schema is saying it's a string field) is
returning "null" for a value, which is impossible (null values aren't
stored... they are simply missing).
This can happen when the field is actually stored as binary (as is the
case for numeric fields).  So my guess is that a field that was
previously a numeric field is now declared to be of type string by the
current schema.

You can try varying the "fl" parameter to see what field is causing
the issue, or try luke or the luke request handler for a lower-level
view of the index.

-Yonik
http://www.lucidimagination.com



On Fri, Jun 3, 2011 at 11:46 AM, dan whelan <d...@adicio.com> wrote:
> I am noticing something strange with our recent upgrade to solr 3.1 and want
> to see if anyone has experienced anything similar.
>
> I have a solr.StrField field named Status the values are Enabled, Disabled,
> or ''
>
> When I facet on that field it I get
>
> Enabled 4409565
> Disabled 29185
> "" 112
>
>
> The issue is when I do a filter query
>
> This query works
>
> select/?q=*:*&fq=Status:"Enabled"
>
> But when I run this query I get a NPE
>
> select/?q=*:*&fq=Status:"Disabled"
>
>
> Here is part of the stack trace
>
>
> Problem accessing /solr/global_accounts/select/. Reason:
>    null
>
> java.lang.NullPointerException
>    at org.apache.solr.response.XMLWriter.writePrim(XMLWriter.java:828)
>    at org.apache.solr.response.XMLWriter.writeStr(XMLWriter.java:686)
>    at org.apache.solr.schema.StrField.write(StrField.java:49)
>    at org.apache.solr.schema.SchemaField.write(SchemaField.java:125)
>    at org.apache.solr.response.XMLWriter.writeDoc(XMLWriter.java:369)
>    at org.apache.solr.response.XMLWriter$3.writeDocs(XMLWriter.java:545)
>    at org.apache.solr.response.XMLWriter.writeDocuments(XMLWriter.java:482)
>    at org.apache.solr.response.XMLWriter.writeDocList(XMLWriter.java:519)
>    at org.apache.solr.response.XMLWriter.writeVal(XMLWriter.java:582)
>    at org.apache.solr.response.XMLWriter.writeResponse(XMLWriter.java:131)
>    at
> org.apache.solr.response.XMLResponseWriter.write(XMLResponseWriter.java:35)
> ...
>
>
> Thanks,
>
> Dan
>
>

Reply via email to