Django CMS Haystack 2.0 Search Index

By | November 6, 2013

Currently django-cms-search doesn’t support haystack 2.0 yet, so here is my modified version to work on haystack 2.0 based on

8 thoughts on “Django CMS Haystack 2.0 Search Index

  1. Nuno Diogo da Silva

    I’ve added your code snippet into my search_indexes.py. And despite being able to rebuild my index successfully (i saw the pages being index on the output of the command), it doesn’t seem to display the pages when i search for them.

    Context:

    I’m using the django cms i18n (bilingual);
    I haven’t installed django-cms-search (since i’m using this snippet).

    Regards.

    Reply
    1. james_lin Post author

      Hi you don’t need django-cms-search to use my snippet, I am not entirely sure if it’s due to multilingual, what error messages are you seeing?

      Reply
      1. Nuno Diogo da Silva

        Hi. I don’t see any. Due to the snippet, the rebuild_index command is able to index cms pages, but when i search for the pages, it doesn’t appear anything. Back when i post my question, i forgot to add the “page_text.txt” file. I thought it was because of that, but even now it doesn’t seem work.

        Reply
        1. James Lin Post author

          What do you mean by doesn’t appear anything? Have you got the result page right? Take a look at this:

          Reply
          1. Nuno Diogo da Silva

            I need to take more time analyzing my code. Although, that snippet you give me now helped a bit. but it’s not working fully. It works with an english search, but not with a portuguese one.

            Anyway, thanks for your time. When i figure it out, i shall write it here 😉

  2. Nuno Diogo da Silva

    I’m using this code snippet on my search_indexes.py and despite being able of indexing the cms pages when rebuilding the index, it’s not returning results when searching.

    Context points:

    – I haven’t installed django-cms-search app, since i’m using this;
    – It’s a bilingual project.

    Any suggestion?

    Regards in advanced.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *