Skip to content
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

Untitled #22

Closed
joshuajonah opened this issue Aug 27, 2009 · 2 comments
Closed

Untitled #22

joshuajonah opened this issue Aug 27, 2009 · 2 comments
Labels

Comments

@joshuajonah
Copy link

I'm trying to do a simple filter by an integer value. The integer is being unicode encoded somewhere which is causing mass craziness. Verified issue with daniellindsley on #haystack.

joshua@symbiosis-staging:/var/www/vhosts/webrealtr.com$ sudo python pri*/pro*/my*/manage.py shell
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated
  from sets import ImmutableSet
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from haystack.query import SearchQuerySet
>>> SearchQuerySet().filter(price__gte=0)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python2.6/dist-packages/haystack/query.py", line 39, in __repr__
    data = list(self[:REPR_OUTPUT_SIZE])
  File "/usr/local/lib/python2.6/dist-packages/haystack/query.py", line 156, in __getitem__
    if not self._cache_is_full():
  File "/usr/local/lib/python2.6/dist-packages/haystack/query.py", line 59, in _cache_is_full
    return len(self._result_cache) >= len(self) - self._ignored_result_count
  File "/usr/local/lib/python2.6/dist-packages/haystack/query.py", line 48, in __len__
    return self.query.get_count()
  File "/usr/local/lib/python2.6/dist-packages/haystack/backends/__init__.py", line 284, in get_count
    self.run()
  File "/usr/local/lib/python2.6/dist-packages/haystack/backends/xapian_backend.py", line 983, in run
    results = self.backend.search(final_query, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/haystack/backends/xapian_backend.py", line 319, in search
    database, query_string, narrow_queries, boost
  File "/usr/local/lib/python2.6/dist-packages/haystack/backends/xapian_backend.py", line 724, in _query
    query = qp.parse_query(query_string, self._flags(query_string))
TypeError: : Swig director type mismatch in output value of type '(Xapian::valueno, std::string, std::string)'
>>> 

When you get a chance ;)

@notanumber
Copy link
Owner

I believe this is fixed in SHA 4ea8271. Please confirm; it's passing all of my tests, but it'd be good to get confirmation from yourself.

@joshuajonah
Copy link
Author

SearchQuerySet().filter(price__gte=0)
[<SearchResult: listings.listing (pk=1L)>, <SearchResult: listings.listing (pk=2L)>, <SearchResult: listings.listing (pk=3L)>, <SearchResult: listings.listing (pk=6L)>, <SearchResult: listings.listing (pk=7L)>, <SearchResult: listings.listing (pk=8L)>, <SearchResult: listings.listing (pk=9L)>, <SearchResult: listings.listing (pk=12L)>, <SearchResult: listings.listing (pk=13L)>, <SearchResult: listings.listing (pk=15L)>, <SearchResult: listings.listing (pk=16L)>, <SearchResult: listings.listing (pk=17L)>, <SearchResult: listings.listing (pk=19L)>, <SearchResult: listings.listing (pk=20L)>, <SearchResult: listings.listing (pk=21L)>, <SearchResult: listings.listing (pk=22L)>, <SearchResult: listings.listing (pk=23L)>, <SearchResult: listings.listing (pk=24L)>, <SearchResult: listings.listing (pk=25L)>, <SearchResult: listings.listing (pk=26L)>]

You are the man David, maybe we will meet at a django-toronto meet in the future, we both should be going.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants