django-haystack

Updating indexes on placeholderfields in real time with django/haystack/solr

徘徊边缘 提交于 2019-12-11 03:57:32
问题 Hello I am integrating searches on my django-cms project. I have made a wiki app, where the content of each page is stored in a PlaceholderField . I can initially index the content of the PlaceholderField with the sudo ./manage.py rebuild_index or update_index , and the search works perfectly. The issue is when I modify the PlaceholderField , the search indexes are not updating, even though I have in my settings.py: HAYSTACK_SIGNAL_PROCESSOR = 'haystack.signals.RealtimeSignalProcessor' Here

(haystack + whoosh) {{ result.object.get_absolute_url }} is not working

旧城冷巷雨未停 提交于 2019-12-11 03:22:31
问题 I am using haystack (2.1.1) and whoosh in my django (1.7) website. i am happy because it is working, but not completely. the app show the right searches but when i click in the results it doesn't go to the product page. it looks like i haven't configured something that make {{ result.object.get_absolute_url }} doesnt work properly. I hope any of you can help me (as reference i am putting all the code) this is my app models (products/models) from django.db import models class Products(models

Django Haystack Rebuild Index

匆匆过客 提交于 2019-12-11 01:37:57
问题 I was reading the 'Getting Started' guide of Haystack and tried to implement Whoosh backend for my website with Haystack. I was successful in setting up the whole project and I can also see the search box on my search.html template. I am unable to build the index though. When I type ./manage.py rebuild_index, I get the error: Unknown command: rebuild_index I know this is a trivial issue. I am unable to understand how the manage.py file can ever understand commands that were not originally a

Django Haystack order by distance by Elasticsearch backend, not a geo_point field error

ⅰ亾dé卋堺 提交于 2019-12-11 01:02:28
问题 I'm using django 1.4, django-haystack 2.0 and Elasticsearch 0.19.1 I have an SearchIndex like that: from haystack import indexes from core.models import Project class ProjectIndex(indexes.RealTimeSearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) location = indexes.LocationField(model_attr='get_location') def get_model(self): return Project and Project model like that: class Project(BaseModel): name = models.CharField(_(u'Proje Adı'), max_length=50)

Haystack Faceted: __init__() got an unexpected keyword argument 'facet_fields'

会有一股神秘感。 提交于 2019-12-10 22:08:31
问题 While enjoying my first results with haystack 2.4.1 (Django 1.8), I have to admit that I'm having a hard time on learning it. The documentation is sometimes incomplete, and some features have to few examples. Faceted search is one of them. I'm following the documentation, and at the url.py: urlpatterns = patterns('haystack.views', url(r'^$', FacetedSearchView(form_class=FacetedSearchForm, facet_fields=['author']), name='haystack_search'), ) I'm getting the following error: TypeError at /tag

Django haystack LocationField created as string instead of geo_point in elasticsearch

匆匆过客 提交于 2019-12-10 20:32:53
问题 I'm using django 1.8.9, django-rest-framework, django-haystack together with Elasticsearch and am attempting to get a LocationField working, the index is created however the type is always string instead of geo_point , so obviously no geo searches work. settings.py: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.gis', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin',

Haystack Multiple Indices - indexed same even there are different search_indexes

◇◆丶佛笑我妖孽 提交于 2019-12-10 18:59:15
问题 I have the following search class ProductIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) destination = indexes.FacetIntegerField( model_attr='hotel__destination__id') country = indexes.FacetIntegerField(model_attr='hotel__country__id') hotel_class = indexes.FacetCharField(model_attr='hotel__hotel_class') hotel_type = indexes.FacetIntegerField(model_attr='hotel__hotel_type__id') def get_model(self): return Product def index_queryset

Haystack / Whoosh Index Generation Error

天涯浪子 提交于 2019-12-10 18:58:47
问题 I'm trying to setup haystack with whoosh backend. When i try to gen the index [or any index command for that matter] i receive: TypeError: Item in ``from list'' not a string if i completely remove my search_indexes.py i get the same error [so i'm guessing it can't find that file at all] what might cause this error? it's set to autodiscover and i'm sure my app is installed because i'm currently using it. Full traceback: Traceback (most recent call last): File "./manage.py", line 17, in <module

Is Django-haystack 2.6.1 compatible with Django 2.0?

▼魔方 西西 提交于 2019-12-10 11:53:32
问题 My question is simple (as per title). Is the current Django-haystack compatible with the newest Django 2.0? Is anyone using this combination? The requirements in the docs and at PYPI suggest that it is: https://django-haystack.readthedocs.io/en/master/#requirements https://pypi.python.org/pypi/django-haystack/2.6.1 But the following user faces issues as well as I do when trying to use it with Django 2.0: Django 2.0 haystack whoosh update index, rebuild index throw error The same setup works

Spelling Suggestions with django-haystack and Solr

佐手、 提交于 2019-12-10 10:24:29
问题 I'm getting "None" for spelling suggestions. First, I have this set in my settings.py file: HAYSTACK_INCLUDE_SPELLING = True I have rebuilt the index: python manage.py rebuild_index and updated it for good measure python manage.py update_index The search works correctly. When I search for "Charger", it returns the results that match. So in my views.py, I then tried: from haystack.query import SearchQuerySet def testpage(request): test_results = SearchQuerySet().auto_query('Chargr') spelling