Skip to content

Required fields are unspecified #50

@phoolish

Description

@phoolish

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions