question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Haystack index failing to build

See original GitHub issue

Hello!

I am having issues with the Haystack index:

Removing all documents from your index because you said so.
DELETE http://es:9200/local-default [status:200 request:0.043s]
DELETE http://es:9200/local-de [status:200 request:0.023s]
DELETE http://es:9200/local-es [status:200 request:0.033s]
All documents removed.
Indexing 349 titles
GET http://es:9200/local-default/_mapping [status:404 request:0.003s]
PUT http://es:9200/local-default [status:200 request:0.130s]
PUT http://es:9200/local-default/_mapping/modelresult [status:200 request:0.039s]
POST http://es:9200/local-default/modelresult/_bulk [status:200 request:0.417s]
POST http://es:9200/local-default/_refresh [status:200 request:0.223s]
Indexing 2 titles
GET http://es:9200/local-de/_mapping [status:404 request:0.007s]
PUT http://es:9200/local-de [status:200 request:0.135s]
PUT http://es:9200/local-de/_mapping/modelresult [status:200 request:0.103s]
POST http://es:9200/local-de/modelresult/_bulk [status:200 request:0.067s]
POST http://es:9200/local-de/_refresh [status:200 request:0.030s]
Indexing 128 titles
GET http://es:9200/local-es/_mapping [status:404 request:0.005s]
PUT http://es:9200/local-es [status:200 request:0.107s]
PUT http://es:9200/local-es/_mapping/modelresult [status:200 request:0.062s]
POST http://es:9200/local-es/modelresult/_bulk [status:200 request:0.234s]
POST http://es:9200/local-es/_refresh [status:200 request:0.154s]
Indexing 71 blog articles
POST http://es:9200/local-default/modelresult/_bulk [status:200 request:0.075s]
POST http://es:9200/local-default/_refresh [status:200 request:0.094s]
Indexing 71 blog articles
[ERROR/MainProcess] Failed indexing 1 - 71 (retry 5/5): Reverse for 'post-detail' with arguments '()' and keyword arguments '{u'slug': u'ft-honoured-digital-innovation-and-business-journa'}' not found. 0 pattern(s) tried: [] (pid 7): Reverse for 'post-detail' with arguments '()' and keyword arguments '{u'slug': u'ft-honoured-digital-innovation-and-business-journa'}' not found. 0 pattern(s) tried: []
Traceback (most recent call last):
  File "/virtualenv/lib/python2.7/site-packages/haystack/management/commands/update_index.py", line 84, in do_update
    backend.update(index, current_qs, commit=commit)
  File "/virtualenv/lib/python2.7/site-packages/haystack/backends/elasticsearch_backend.py", line 168, in update
    prepped_data = index.full_prepare(obj)
  File "/virtualenv/lib/python2.7/site-packages/haystack/indexes.py", line 208, in full_prepare
    self.prepared_data = self.prepare(obj)
  File "/virtualenv/lib/python2.7/site-packages/aldryn_search/base.py", line 43, in prepare
    self.prepare_fields(obj, current_language, request)
  File "/virtualenv/lib/python2.7/site-packages/aldryn_search/base.py", line 141, in prepare_fields
    self.prepared_data['url'] = self.get_url(obj)
  File "/virtualenv/lib/python2.7/site-packages/aldryn_search/base.py", line 122, in get_url
    return obj.get_absolute_url()
  File "/virtualenv/lib/python2.7/site-packages/djangocms_blog/models.py", line 259, in get_absolute_url
    return reverse('%s:post-detail' % self.app_config.namespace, kwargs=kwargs)
  File "/virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 578, in reverse
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  File "/virtualenv/lib/python2.7/site-packages/django/core/urlresolvers.py", line 495, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
NoReverseMatch: Reverse for 'post-detail' with arguments '()' and keyword arguments '{u'slug': u'ft-honoured-digital-innovation-and-business-journa'}' not found. 0 pattern(s) tried: []

I am running latest version of the blog on the Divio platform.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
yakkycommented, Apr 17, 2017

@gmenih341 thanks for getting back on this. Yes: a page is considered published only if also all its parents are published. This can be confusing with apphooks because reversing won’t work as per traceback above. We -the django CMS team- are thinking about a few solutions to make this clearer / easier to handle

0reactions
yakkycommented, Dec 31, 2017

Just as a follow up before closing this. django CMS 3.5 will have a few changes in this regards and it will make much easier to handle cases like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build index for solr/haystack: unknown field 'django_id'
The problem is with the Solr (haystack document use v3.5.0, here you may be using the latest) not finding the configuration file.
Read more >
Debugging Haystack — Haystack 2.5.0 documentation
Several issues can cause no results to be found. Most commonly it is either not running a rebuild_index to populate your index or...
Read more >
Haystack: Fix error building index to a null fields
I'm using haystack on my django project using Whoosh, and got some trouble once building index for the haystack and below is my...
Read more >
Django Haystack - unable to build solr schema-django
Several issues can cause no results to be found. Most commonly it is either not running a rebuild_index to populate your index or...
Read more >
Create a Haystack Index — MongoDB Manual
To build a haystack index, you must specify the bucketSize option when creating the index. A bucketSize of 5 creates an index that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found