Questions tagged [django-haystack]

Haystack is a modular search app for Django projects. It aims to provide a familiar API for django developers that does not depend on the backend used for searching.

Haystack gives django developers a familiar API to write search code and use it with any supported search engine (as of this writing those are Solr, Whoosh, ElasticSearch and Xapian). It also provides basic views and forms necessary for building the search infrastructure into your project in a way that is extensible and doesn't require modifications in other apps.

It provide advanced features like

  • Highlighting
  • Faceting
  • Autocomplete
  • Boost
  • Signal Processors
  • Multiple Indexes
  • Rich Content Extraction
  • Spatial Search
1312 questions
31
votes
4 answers

Updating a Haystack search index with Django + Celery

In my Django project I am using Celery. I switched over a command from crontab to be a periodic task and it works well but it is just calling a method on a model. Is it possible to update my Haystack index from a periodic task as well? Has anyone…
knuckfubuck
  • 969
  • 12
  • 25
26
votes
2 answers

How to add something to PYTHONPATH?

I downloaded a package (called pysolr 2.0.15) to my computer to be used with Haystack. The instructions asks me to add pysolr to my PYTHONPATH. What exactly does that mean? After extracting the pysolr files, I ran the command python setup.py install…
goelv
  • 2,774
  • 11
  • 32
  • 40
22
votes
5 answers

How do I do a partial field match using Haystack?

I needed a simple search tool for my django-powered web site, so I went with Haystack and Solr. I have set everything up correctly and can find the correct search results when I type in the exact phrase, but I can't get any results when typing in a…
Ben S
  • 1,407
  • 1
  • 13
  • 27
22
votes
5 answers

Apache solr search part of the word

I'm using apache solr search engine for indexing my website database.. I'm using django+http://haystacksearch.org/ So let's say I have document that have word "Chicken" When I search for "chicken" - solr can find this document But When I search…
Djangonaut
  • 5,511
  • 7
  • 40
  • 53
16
votes
5 answers

Haystack in INSTALLED_APPS results in Error: cannot import name openProc

I am pretty stuck right now. I have a Django project that's been working great until I tried to add Haystack/Whoosh for search. I've had this same stack in other projects working fine. Whenever I have "haystack" in my settings.INSTALLED_APPS and I…
gohnjanotis
  • 6,513
  • 6
  • 37
  • 57
14
votes
2 answers

Haystack says “Model could not be found for SearchResult”

After updating my Django from 1.7 to 1.9, search engine, which is based on Haystack and Solr, stopped working. This is what I get: ./manage.py shell Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright",…
golden_boy615
  • 394
  • 3
  • 17
14
votes
2 answers

django haystack highlight template tag issue

Is there a way to make django-haystack's {% highlight %} template tag show the full variable passed in, rather than removing everything before the first match? I'm using it like this: {% highlight thread.title with request.GET.q %}
Rick
  • 225
  • 1
  • 5
14
votes
2 answers

Whoosh index viewer

I'm using haystack with whoosh as backend for a Django app. Is there any way to view the content (in a easy to read format) of the indexes generated by whoosh? I'd like to see what data was indexed and how so I can better understand how it works.
daniels
  • 18,416
  • 31
  • 103
  • 173
14
votes
1 answer

Django Haystack update index faster

I've been using Django Haystack for a while now and it's great! I have a rather heavy site with data which needs to be updated from time to time (15 to 30 mins). When using the python manage.py update_index it takes lots of time to update the data.…
prototype
  • 3,303
  • 2
  • 27
  • 42
13
votes
3 answers

django haystack: which search engine would be better

I'm building a Django project that needs a good search functionality Which of the search engines out of these would be good to use with django haystack solr elasticsearch Xapian One other advice I need is should I prefer going with above or use…
Neo
  • 5,070
  • 10
  • 46
  • 65
13
votes
2 answers

Django haystack whoosh super slow

I have a simple setup with django-haystack and whoosh engine. A search yielding 19 objects took me 8 seconds. I used the django-debug-toolbar to determine that i had a bunch of repeated queries. I then updated my search view to prefetch relations,…
Eldamir
  • 9,888
  • 6
  • 52
  • 73
13
votes
1 answer

I don't understand the results that's returning from elasticsearch/haystack

The results that are being returned from haystack, using an elasticsearch backend seem erroneous to me. My search index is as follows: from haystack import indexes from .models import IosVideo class VideoIndex(indexes.SearchIndex,…
user133688
  • 6,864
  • 3
  • 20
  • 36
13
votes
2 answers

Django haystack EdgeNgramField given different results than elasticsearch

I'm currently running haystack with an elasticsearch backend, and now I'm building an autocomplete for cities names. The problem is that SearchQuerySet is giving me different results, which from my perspective are wrong, than the same query executed…
tufla
  • 562
  • 6
  • 16
13
votes
2 answers

Which fields of the model in the django-haystack tutorial get indexed?

I'm trying to get my head around the django-haystack tutorial in order to add search functionality to my application. Unfortunately, I don't quite understand some key parts when it comes to build the search index. In the tutorial, the following…
pemistahl
  • 9,304
  • 8
  • 45
  • 75
12
votes
4 answers

Django haystack and whoosh

Does anyone have any experience using django-haystack with the whoosh backend? I'm looking to use it for a categorized live-search type tool. Is it gonna be fast/efficient enough in a production environment to avoid setting up either solr or xapian?
sleepyjames
  • 779
  • 5
  • 16
1
2 3
87 88