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

  • Home
  • SEARCH
  • 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 8143665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:10:48+00:00 2026-06-06T13:10:48+00:00

I wanted to implement a search feature for my web app. I choose Haystack

  • 0

I wanted to implement a search feature for my web app. I choose Haystack and Solr. After following the procedure in the docs. I tried to rebuild solr index ( python manage.py rebuild_index ) but I’m getting the below error. What I’m I missing?

   WARNING: This will irreparably remove EVERYTHING from your search index in connection 'default'.
   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.
   Failed to clear Solr index: [Errno 10061] No connection could be made because the   target machine actively refused it
   All documents removed.
   Indexing 2 fincribs.
   Failed to add documents to Solr: [Errno 10061] No connection could be made because the target machine actively refused it

Haystack settings

   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',
    },
 }

Models

     class Fincrib(models.Model):
           user=models.ForeignKey(User)
           title=models.CharField(max_length=250, unique=True)
           address=models.CharField(max_length=200)
           city=models.CharField(max_length=200)
           state=models.CharField(max_length=200)
           main_view=models.ImageField(upload_to="photos",blank=True, null=True)
           side_view=models.ImageField(upload_to="photos",blank=True, null=True)
           pub_date=models.DateTimeField()

           def __unicode__(self):
               return self.title
          def get_absolute_url(self):
              return self.title

Search_index.py

         class FincribIndex(indexes.SearchIndex, indexes.Indexable):
               text=indexes.CharField(document=True, use_template=True)
               address=indexes.CharField(model_attr='address')
               city=indexes.CharField(model_attr='city')
               state=indexes.CharField(model_attr='state')
               pub_date=indexes.DateTimeField(model_attr='pub_date')

               def get_model(self):
                   return Fincrib
               def index_queryset(self):
                   return self.get_model().objects.filter(pub_date__lte=datetime.datetime.now())
  • 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-06T13:10:50+00:00Added an answer on June 6, 2026 at 1:10 pm

    Then first of all, try to get solr running.

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

Sidebar

Related Questions

I want to implement a search feature in an iPhone app. Basically, the user
Let's say you wanted to implement a breadth-first search of a binary tree recursively
If I wanted to implement an app for 2 Android devices so I can
I wanted to implement Chrome's Omnibox search into my site, and followed the relatively
I wanted to implement the ActionBar (Android 4.0) in a test App to see
I wanted to implement web hooks in python. Both at server end and client
I wanted to implement an ajax based autocomplete feature for my searchbox, and i
i wanted to implement charts in my silverlight app. i have installed SL4 in
In my following program I'm currently using unordered_map just because I wanted O(1) search/insert
I wanted to implement an app that prevents calls like a firewall. When I

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.