Nie można dodać dokumentów do Solr: [Przyczyna: błąd 404 nie znaleziono]
Próbuję zaindeksować model w Solr za pomocą django-haystack, ale zwraca mi następujący błąd (podczas używania rebuild_index lub update_index):
Failed to add documents to Solr: [Reason: Error 404 Not Found]
To jest search_indexes.py
from haystack import indexes
from haystack.indexes import SearchIndex
from jobpost.models import *
class JobIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
post_type = indexes.CharField(model_attr='post_type')
location = indexes.CharField(model_attr='location')
job_type = indexes.CharField(model_attr='job_type')
company_name = indexes.CharField(model_attr='company_name')
title = indexes.CharField(model_attr='title')
def get_model(self):
return jobpost
def index_queryset(self,**kwargs):
return self.get_model().objects.all()
połączenie stogu siana:
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
'URL': 'http://127.0.0.1:8983/solr',
'SITECONF': 'jobpost.search_sites'
},
}
Wygenerowałem schema.xml wiele razy restartowany solr..pl umieścił go w solr / conf..don't wiesz co to jest