DjangoBB

Django based forum engine

  • You are not logged in.
  • Root
  • » Bugs
  • » Unable to search with latest version of DjangoBB [RSS Feed]

#1 July 6, 2011 18:50:43

mdsol
Registered: 2010-08-25
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

Hi everybody.

Everytime I try to do a search, I receive the following error:

TypeError at /search/
unsupported operand type(s) for |=: 'list' and 'SQ'

I have the following env:

(env)Angus:forum francesco$ pip freeze
Django==1.2.5
Markdown==2.0
MySQL-python==1.2.3
PIL==1.1.7
Pygments==1.4
South==0.7.3
Whoosh==1.8.4
-e hg+[url]http://bitbucket.org/benoitc/django-authopenid@2bf32e03f71cb98de98b1bf1e4689c88837583b4#egg=django_authopenid-tip[/url]
django-debug-toolbar==0.8.5
django-haystack==1.2.4
-e git://github.com/jtauber/django-mailer.git@840d25bb9db9fbc801b9226607ddce49f4ac37c5#egg=django_mailer-0.2a1.dev3-py2.6-dev
django-messages==0.4.4
django-registration==0.7
-e svn+[url]http://postmarkup.googlecode.com/svn/trunk@74#egg=postmarkup-1.1.5dev-py2.6-dev_r74[/url]
python-openid==2.2.5
wsgiref==0.1.2

and djangobb-forum downloaded 2 days ago.

Is this a known bug? I have tryed to search something but haven't found anything useful.
I have also trield to use the “simple” search engine, with some different errors.

Thank you,
Francesco

Offline

#2 July 7, 2011 10:18:36

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 307
Reputation: +  6  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

known, i f u have time - send patch )

Offline

#3 July 7, 2011 16:54:42

mdsol
Registered: 2010-08-25
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

I am working on it, but I cannot figure how to fix it.
Is there any known combination of haystack/whoosh that is known to be working?

Offline

#4 July 7, 2011 17:25:21

mdsol
Registered: 2010-08-25
Posts: 3
Reputation: +  0  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

I have fixed it.
The search is very slow, but it works.
How can I send you the patch? Attaching here the new views.py?

Offline

#5 July 11, 2011 16:39:56

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 307
Reputation: +  6  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

create ticket or find opened at djangobb.org

slow? what u mean) i don't think tnat haystack very slow solution for searching if u path correct.

Offline

#6 Oct. 8, 2011 23:28:14

testjoey
Registered: 2011-06-06
Posts: 2
Reputation: +  0  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

the fix is very easy. you just need to change line 196 of views.py from

topics_to_exclude |= SQ(topic=post.object.topic)

to

topics_to_exclude = topics_to_exclude | SQ(topic=post.object.topic)

and change line 190 of views.py from

topics_to_exclude = []

to

topics_to_exclude = SQ()

you then have to fix search_posts.html to use posts.object instead of posts.instance for when you search by posts. (there is another thread about this)

Edited testjoey (Oct. 9, 2011 04:21:48)

Offline

#7 Oct. 11, 2011 13:37:58

slav0nic
DjangoBB Developer
From: Ukraine
Registered: 2009-10-25
Posts: 307
Reputation: +  6  -
Profile   Send e-mail  

Unable to search with latest version of DjangoBB

testjoey
tnx, commited)

Offline

  • Root
  • » Bugs
  • » Unable to search with latest version of DjangoBB [RSS Feed]

Board footer

Moderator control

Powered by DjangoBB

Lo-Fi Version