sunburnt
sunburnt copied to clipboard
The non required parameter defaultSearchField in solr 3.6 causes search error
Comments from the schema.xml of solr 3.6
<!-- field for the QueryParser to use when an explicit fieldname is absent
DEPRECATED: specify "df" in your request handler instead.
<defaultSearchField>text</defaultSearchField> -->
I had to uncomment this parameter in order to avoid:
/usr/local/lib/python2.7/dist-packages/sunburnt/search.pyc in add_exact(self, field_name, values, term_or_phrase)
315 else:
316 raise SolrError("If field_name is '*', then only '*' is permitted as the query")
--> 317 insts = [field.instance_from_user_data(value) for value in values]
318 for inst in insts:
319 if isinstance(field, SolrUnicodeField):
AttributeError: 'NoneType' object has no attribute 'instance_from_user_data'
Hi, Just a quick FYI. I was doing the sunburnt tutorial. I get another error sunburnt search.py line 317 'NoneType' object has no attribute 'instance_from_user_data' using this code
response = solr_conn.si.query("Game").field_limit(["id","name"])
However if you add the field name it works:
response = solr_conn.si.query(name="Game*").field_limit(["id","name"])
Thanks. Carlos
Yep. confirming. Saw that here as well.