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

Required fields are unspecified #50

Open
phoolish opened this issue Apr 20, 2012 · 1 comment
Open

Required fields are unspecified #50

phoolish opened this issue Apr 20, 2012 · 1 comment

Comments

@phoolish
Copy link

I get this error when I try to add documents to Solr:

SolrError at /admin/page/page/1/
These required fields are unspecified:
['app_type', 'description']

What is odd about it is the documents still get added or updated without a problem.

I am using sunburnt==0.6

I working in django. here is the specific model:

class Page(models.Model):
    title = models.CharField(max_length=200)
    slug = models.SlugField(unique=True)
    description = models.TextField()

    def __unicode__(self):
        return self.title

    def app_type(self):
        return 'page'

Here is my schema file:

<?xml version="1.0" encoding="UTF-8" ?>
<schema name="myapp" version="1.5">
        <types>
                <fieldType name="string" class="solr.StrField" multiValued="true" />
                <fieldType name="text" class="solr.TextField" />
        </types>
        <fields>
                <field name="pk" type="string" stored="true" required="true" />
                <field name="app_type" type="string" stored="true" required="true" />
                <field name="title" type="string" indexed="true" stored="true"/>
                <field name="slug" type="string" stored="true"/>
                <field name="description" type="text" indexed="true" stored="true" required="true" />
        </fields>
</schema>
@phoolish
Copy link
Author

I am using a post_save signal to add/update the object on save.

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

1 participant