-
Notifications
You must be signed in to change notification settings - Fork 93
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
Must not assume django_id is an int #138
Labels
Comments
You are correct. We are assuming ints. I don't see any issue in extending it to non-integers. |
charles-vdulac
added a commit
to charles-vdulac/xapian-haystack
that referenced
this issue
Nov 19, 2016
charles-vdulac
added a commit
to charles-vdulac/xapian-haystack
that referenced
this issue
Nov 19, 2016
charles-vdulac
added a commit
to charles-vdulac/xapian-haystack
that referenced
this issue
Nov 24, 2016
charles-vdulac
added a commit
to charles-vdulac/xapian-haystack
that referenced
this issue
May 3, 2017
charles-vdulac
added a commit
to charles-vdulac/xapian-haystack
that referenced
this issue
May 3, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
In xapian_backend.py it is not safe to assume that django_id is an int. In my application, for example, I use django-uuidfield and the id (pk) of the objects cannot be cast to integer.
from xapian_backend.py
if field['field_name'] in ('id', 'django_id', 'django_ct'):
# Private fields are indexed in a different way:
#
django_id
is an int anddjango_ct
is text;# besides, they are indexed by their (unstemmed) value.
if field['field_name'] == 'django_id':
value = int(value)
value = _term_to_xapian_value(value, field['type'])
Do you have any suggestion how I could resolve this?
Thanks,
/mike
The text was updated successfully, but these errors were encountered: