Hey,

I use sphinx on regular basis with PHP and now I wanted to implement
it to my Django project. Everything went smoothly, but when I tried my
first search, I got an error.

Exception Value:    'Product' object has no attribute 'id'
Exception Location: D:\dev\Python25\Lib\site-packages\djangosphinx
\__init__.py in _get_results, line 427
.....
D:\dev\Python25\Lib\site-packages\djangosphinx\__init__.py in
_get_results
427. queryset = dict([(o.id, o) for o in qs])

As far I know it tries to use ID as DOC ID, but since I have built
this project on an existing database I use different columns as
primary keys. In this particular case product_id. And I have never run
into this problem with PHP and I used sphinx with multiple databases.
I didnt find anything closely related to this problem, since they all
use ID in all articles about it and I cant even find a proper
documentation to django-sphinx. I dont know... maybe I just dumb lol

So my question would be: How can I specify another column as DOC id in
django-sphinx?

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to