मैं Django + Haystack के साथ एक सरल खोज इंजन विकसित कर रहा हूं। मैं इन ट्यूटोरियल का अनुसरण कर रहा हूं:
- http://django-haystack.readthedocs.org/en/latest/tutorial.html#solr http://django-haystack.readthedocs.org/en/latest/installing_search_engines.html
- http://django-haystack.readthedocs.org/en/latest/installing_search_engines.html
के साथ अनुक्रमण के समय
python manage.py rebuild_index
मुझे यह त्रुटि मिलती है:
Failed to add documents to Solr: No connection adapters were found for "localhost:8983/solr/update/?commit=true"
मैंने schema.xml को अपडेट किया, सॉल सर्वर को फिर से शुरू किया लेकिन त्रुटि बनी हुई है। मेरे द्वारा यह कैसे किया जा सकता है?
उत्तर:
उत्तर № 1 के लिए 1समस्या पाई गई। मेरे द्वारा लिखे गए SearchIndex टेम्पलेट को निश्चित करें:
{{ object.title }}
{{ object.user.get_full_name }}
{{ object.body }}
समस्या "get_full_name" थी
साथ में
{{ object.title }}
{{ object.user }}
{{ object.body }}
वस्तुओं को अनुक्रमित किया जाता है।
मुझे लगता है कि उपयोगकर्ता मॉडल में "t a standar पद्धति" get_full_name "नहीं है।