-
Notifications
You must be signed in to change notification settings - Fork 1.3k
__len__() should return >= 0 error fixed #1601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
__len__() should return >= 0 error fixed #1601
Conversation
python2.7/site-packages/haystack/query.py” in count 522. return len(self) Exception Type: ValueError at /search/ Exception Value: __len__() should return >= 0 Request information: USER: AnonymousUser
Can you explain the circumstances where you get a negative number of results? Ideally this would have a test-case, too. |
@acdha In some cases the some of the indexes may delete(or not properly indexed) or which may not have |
Wouldn't be the index then be in a malformed state? Searching may lead into wrong search results, or nothing will be found, although the search term should be found? |
@frankystone |
@frankystone and @acdha please approve the merge request. |
The PR still could use some tests |
#1601 ist not working for me: no error anymore, but also no results found |
@sebhaase try the command below python manage.py update_index --remove It will update the new records and removes the deleted records. |
@AnjaneyuluBatta505 you misunderstood. Nothing was deleted. I'm saying #1601 causes that I´m not seeing the correct answer. Old haystack version still works for me - |
@sebhaase I've tried it. It's working for me. |
The remove option seems to work also for me. But it is just like rebuild_index, at least it is just that slow :( |
This is still happening |
Uh oh!
There was an error while loading. Please reload this page.