Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The non required parameter defaultSearchField in solr 3.6 causes search error #59

Open
leonardossz opened this issue Jul 18, 2012 · 2 comments

Comments

@leonardossz
Copy link

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'
@fe01134
Copy link

fe01134 commented Sep 9, 2012

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

@mlissner
Copy link
Contributor

Yep. confirming. Saw that here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants