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
8
votes
1 answer

Specifying an alternate path for a Haystack template

The Haystack documentation states that: Additionally, we’re providing use_template=True on the text field. This allows us to use a data template (rather than error-prone concatenation) to build the document the search engine will index. You’ll need…
user764357
8
votes
1 answer

Django Haystack: responsibilities of the template and model indexes

I've gone over the docs, and I've even created a few search back ends, but I"m still really confused on what these things do in haystack. Is the search back end searching the fields you put in your class that inherits indexes.SearchIndex,…
user133688
  • 6,864
  • 3
  • 20
  • 36
8
votes
3 answers

Building Solr indexes through Haystack throws unknown field error

I'm trying to integrate Haystack with Solr. When I try to build the index, I get an error "Unknown field django_id" from SOLR. What's causing this to happen?
Sriram
  • 838
  • 7
  • 15
8
votes
1 answer

Django Haystack Results to Django Rest Framework Serializer

I am attempting to do a search using Django Haystack and then upon retrieving results I need to pass these results to my Django Rest Framework serializer. The Django Rest Framework serializers.ModelSerializer requires that a queryset of objects gets…
Zac
  • 461
  • 5
  • 15
8
votes
1 answer

When to use Haystack/ElasticSearch vs Django's ORM

So I implemented Haystack with ElasticSearch a week ago within our BETA application. One thing I can notice is that getting some data (large amount) back to our users (for example listing all the users within the application) is much faster by going…
abisson
  • 4,365
  • 9
  • 46
  • 68
8
votes
3 answers

Django haystack with elasticsearch, indexing issue

Im using django-haystack with elasticsearch but there is a problem with indexing. When rebuilding my index python manage.py rebuild_index following error is raised: Traceback (most recent call last): File…
palo
  • 81
  • 1
  • 3
8
votes
3 answers

Haystack queryset contains None elements

I'm using Haystack for search, and the resulting SearchQuerySet returned contains None elements: >> SearchQuerySet().models(Question, Document, Idea) >> [, None, None, None] Running rebuild_index doesn't help. If…
zimkies
  • 1,067
  • 1
  • 9
  • 20
7
votes
1 answer

Haystack incompatible with Django 1.4?

I just upgradated my django to 1.4. I am getting trouble with haystack app. Also, I tried to update haystack to last stable version but I still having problems. Does anyone had theses errors? How can I solve it? I am getting the following…
Thomas
  • 2,256
  • 6
  • 32
  • 47
7
votes
3 answers

django haystack autocomplete

I am trying to use django-haystack (been around 2 days now), and I have got the basic Getting Started example working and it looks very impressive. I would now like to try the autocomplete function on…
JohnJ
  • 6,736
  • 13
  • 49
  • 82
7
votes
1 answer

Django haystack: Boosting search results if the searchterm appears in a specific field

I'm using django-haystack for searching on my site. My problem is, I would like to have search results on top if the search term was found in a specific field. Let's say I search for blog-entries, then I would like to show those results on top…
scherlock
  • 217
  • 3
  • 8
7
votes
1 answer

django-haystack : Better ways of creating search indexes for models having foreign key and many-to-many fields

Suggestions needed for creating better and efficient search indexes for models having foreign key and many-to-many fields while using haystack with django. Sample Model: class Resource(models.Model): title = models.CharField(max_length=255) …
Neo
  • 5,070
  • 10
  • 46
  • 65
7
votes
7 answers

Installing django-haystack

Super simple question: I went through the "getting start" doc for haystack (using whoosh; I installed both python-whoosh and haystack using pip (first time using it)), and I simply cannot run python manage.py rebuild_index. I get this error: python…
jlugo
  • 324
  • 3
  • 7
7
votes
3 answers

Django-Haystack giving attribute error?

I am trying to use Haystack and Whoosh with my Django app. I followed the steps on Haystack docs, but i am getting this error when i do a search AttributeError at /search/ 'module' object has no attribute 'get_model' search_indexes.py - import…
doctorsherlock
  • 1,334
  • 4
  • 19
  • 41
7
votes
1 answer

Django Haystack substring search

I have recently added search capabilities to my django-powered site to allow employers to search for employees using keywords. When the user initially uploads their resume, I turn it into text, get rid of stop words, and then add the text to a…
dpetters
  • 163
  • 4
  • 15
7
votes
2 answers

Haystack and Elasticsearch: Limit number of results

I have 2 servers with Haystack: Server1: This has elasticsearch installed Server2: This doesn't have elasticsearch, the queries are made to Server1 My issue is about pagination when I make queries from Server2 to Server1: Server2 makes query to…
AlvaroAV
  • 10,335
  • 12
  • 60
  • 91