django-haystack and solr setup issue (undefined field text error)
===

I am new to Solr. I have been following the documentation provided in the http://haystacksearch.org/ site.
My project is on django 1.4.

The steps I followed:

1.Added haystack to installed apps.

2.Modified settings.py with

    HAYSTACK_SITECONF = 'directory.search_sites'
    HAYSTACK_SEARCH_ENGINE = 'solr'
    HAYSTACK_SOLR_URL = 'http://127.0.0.1:8983/solr'
    HAYSTACK_CONNECTIONS = {
        'default': {
            'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
            'URL': 'http://127.0.0.1:8983/solr'
            # ...or for multicore...
            # 'URL': 'http://127.0.0.1:8983/solr/mysite',
            },
    }

 3.My search_indexes.py file

    
    from haystack import indexes
    from app.models import SellerItem


    class SellerItemIndex(indexes.SearchIndex):
        text = indexes.CharField(document=True, use_template=True)
        title = indexes.CharField(model_attr='title')
        sub_title = indexes.CharField(model_attr='sub_title')
        description = indexes.CharField(model_attr='description')

        def get_model(self):
            return SellerItem

        def index_queryset(self):
            """Used when the entire index for model is updated."""
            return self.get_model().objects.filter(pk__gt=0)

4.Added search_sites.py

    import haystack
    haystack.autodiscover()

5.added templates/search/indexes/selleritem.txt

    {{ object.title }}
    {{ object.sub_title }}
    {{ object.description }}

6.Added this to urls.py:

    (r'^search/', include('haystack.urls')),


7.Created search template


8.Replaced schema.xml in apache-solr-3.6.0/example/solr/conf with the generated xml by using the command:

    python manage.py build_solr_schema

I am getting an error like this when I start the solr server:

    SEVERE: org.apache.solr.common.SolrException: undefined field text
    at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1330)
    at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getAnalyzer(IndexSchema.java:408)
    at org.apache.solr.schema.IndexSchema$SolrIndexAnalyzer.reusableTokenStream(IndexSchema.java:383)
    at org.apache.lucene.queryParser.QueryParser.getFieldQuery(QueryParser.java:574)
    at org.apache.solr.search.SolrQueryParser.getFieldQuery(SolrQueryParser.java:206)
    at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1429)
    at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1317)
    at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1245)
    at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
    at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
    at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:79)
    at org.apache.solr.search.QParser.getQuery(QParser.java:143)
    at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:105)
    at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:165)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
    at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:59)
    at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1182)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)

Still the server will be starting
When I do ./manage.py rebuild_index and do a search I get an error log


    Problem accessing /solr/select/. Reason:undefined field text

What did I miss? Did anyone had the same issue before?

Thank you


