daevaorn / djapian

High level Xapian integration for Django
Other
6 stars 3 forks source link

AttributeError with Djapian 2.2.3 #69

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to create an index I get the following error (using ubuntu 9.04
and django 1.0.2 with python 2.6.2):

----------------------------------------------------------------------
  File "/home/.../django/project/../project/app/index.py", line 6, in <module>
    space.add_index(Studio, attach_as='indexer')
  File
"/usr/local/lib/python2.6/dist-packages/Djapian-2.2.3-py2.6.egg/djapian/space.py
",
line 31, in add_index
    indexer = self.create_default_indexer(model)
  File
"/usr/local/lib/python2.6/dist-packages/Djapian-2.2.3-py2.6.egg/djapian/space.py
",
line 70, in create_default_indexer
    for field in model._meta.field:
AttributeError: 'Options' object has no attribute 'field'
----------------------------------------------------------------------

Tried also the newest version of djapian (2.6.8) where creating an index is
ok, but using Indexer like

----------------------------------------------------------------------
class MovieIndexer(Indexer):
    fields = ['plot']
    tags = [
        ('title', 'title'),
        ('director', 'director'),
        ('release_date', 'release_date')
    ]

space.add_index(Movie, MovieIndexer, attach_as='indexer')
----------------------------------------------------------------------

does not show any results... (tried with splite3 and postgres 8.3)

Using space.add_index(Movie, attach_as='indexer') is working...

Thanks in advance,
Hans

Original issue reported on code.google.com by braxmeie...@gmail.com on 14 Jul 2009 at 11:24

GoogleCodeExporter commented 9 years ago
I think it is recently closed bug with default indexer creation:
http://code.google.com/p/djapian/source/detail?r=259

It will be part of the 2.2.4 coming bugfix release

Original comment by daevaorn on 14 Jul 2009 at 5:14