Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8789015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:17:11+00:00 2026-06-13T22:17:11+00:00

I’m trying to implement search to my django based website. While following the tutorial

  • 0

I’m trying to implement search to my django based website.

While following the tutorial I found this:

If you’re using the Solr backend, you have an extra step. Solr’s
configuration is XML-based, so you’ll need to manually regenerate the
schema. You should run ./manage.py build_solr_schema first, drop the
XML output in your Solr’s schema.xml file and restart your Solr
server.

First, I don’t know where to put my schema.xml, after some resarch I figured I’d create a folder inside my project to put it: myprojectname/solr/schema.xml. Is that right?

Second, how do I restart Solr?

UPDATE

I downloaded Solr,unzipped it and I put the schema.xml generated inside example/solr/conf

then I start solr java -jar start.jar

but when I try to build the index :
./manage.py rebuild_index

I get :

WARNING: This will irreparably remove EVERYTHING from your search index.
Your choices after this are to restore from backups or rebuild via the `rebuild_index` command.
Are you sure you wish to continue? [y/N] y

Removing all documents from your index because you said so.
All documents removed.
Indexing 1 News.
Failed to add documents to Solr: [Reason: None]
<response><lst name="responseHeader"><int name="status">400</int><int    name="QTime">4</int></lst><lst name="error"><str name="msg">ERROR: [doc=news.news.2]   unknown field 'django_id'</str><int name="code">400</int></lst></response>
Indexing 1 entries.

Failed to add documents to Solr: [Reason: None]
<response><lst name="responseHeader"><int name="status">400</int><int name="QTime">17</int></lst><lst name="error"><str name="msg">ERROR: [doc=zinnia.entry.2] unknown field 'django_id'</str><int name="code">400</int></lst></response>

I verified my schema.xml ,and I do have :

<field name="django_ct" type="string" indexed="true" stored="true" multiValued="false" />
<field name="django_id" type="string" indexed="true" stored="true" multiValued="false" />


P.S.
I’m using Django 1.2 and Haystack 1.2.7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:17:12+00:00Added an answer on June 13, 2026 at 10:17 pm

    The solr server needs to have a copy of your schema.xml not django. I usually keep a copy of the schema.xml in my django project for version control, but solr can’t find it there.

    Is you solr server local? Are you using a hosted or remote Solr service? I develop locally then use websolr b/c i dont want to configure solr for production.

    For local dev on OSX

    I’m assuming this is local development on OSX and that you have homebrew installed (assumptions – give me more info if this isnt the case):

    brew install solr
    

    This is going to install Solr at someplace like: /usr/local/Cellar/solr/...

    Note: When im developing locally, I like to use fabric for running deployment and some startup tasks.

    So in my fabfile.py I have a fabric command to copy my schema.xml into the proper file and start the solr server (I just run fab solr at the cmd line)

    def solr() :
        # build a new updated schema.xml (changes to indexes/models may require this so always do it for local testing)
        local('python manage.py build_solr_schema > schema.xml')
        # copy the schema.xml into the proper directory
        local('cp schema.xml /usr/local/Cellar/solr/3.6.0/libexec/example/solr/conf/schema.xml')
        # start the solr server
        local('cd /usr/local/Cellar/solr/3.6.0/libexec/example && java -jar start.jar')
    

    Note: you can run these commands on the command line if you dont use fabric

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.