sunburnt icon indicating copy to clipboard operation
sunburnt copied to clipboard

The non required parameter defaultSearchField in solr 3.6 causes search error

Open leonardossz opened this issue 12 years ago • 2 comments

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'

leonardossz avatar Jul 18 '12 18:07 leonardossz

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

fe01134 avatar Sep 09 '12 03:09 fe01134

Yep. confirming. Saw that here as well.

mlissner avatar May 24 '13 18:05 mlissner