Note that there are some explanatory texts on larger screens.

plurals
  1. PONo indexers created by Djapian for Django
    primarykey
    data
    text
    <p>I am working through the tutorial for setting up Djapian and am trying to use the indexshell (as demonstrated in <a href="http://code.google.com/p/djapian/wiki/Tutorial#Initial_data_and_index_check" rel="nofollow noreferrer">this step</a>). When I run the command 'list' I get the following output:</p> <pre><code>Installed spaces/models/indexers: - 0: 'global' </code></pre> <p>I therefore cannot run any queries:</p> <pre><code>&gt;&gt;&gt; query No index selected </code></pre> <p>Which leads me to attempt:</p> <pre><code>&gt;&gt;&gt; use 0 Illegal index alias '0'. See 'list' command for available aliases </code></pre> <p>My index.py is as follows:</p> <pre><code>from djapian import space, Indexer, CompositeIndexer from cms.models import Article class ArticleIndexer(Indexer): fields = ['body'] tags = [ ('title', 'title'), ('author', 'author'), ('pub_date', 'pub_date',), ('category', 'category') ] space.add_index(Article, ArticleIndexer, attach_as='indexer') </code></pre> <p><strong>Update:</strong> I moved the djapian folder from site-packages to within my project folder and I move index.py from the project root to within the djapian folder. When I run 'list' in the indexshell the following is now returned:</p> <pre><code>&gt;&gt;&gt; list Installed spaces/models/indexers: - 0: 'global' - 0.0 'cms.Article' -0.0.0: 'djapian.space.defaultcmsarticleindexer' </code></pre> <p>I still cannot do anything though as when I try to select an index I still get the following error:</p> <pre><code>&gt;&gt;&gt; use 0.0 Illegal index alias '0'. See 'list' command for available aliases </code></pre> <p><strong>Update 2:</strong> I had a problem with my setting for DJAPIAN_DATABASE_PATH which is now fixed. I can select an indexer using the command 'use 0.0.0' but when I try to run a query it raises the following ValueError: "Empty slice".</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload