On 12/17/2014 11:52 AM, Radomir Wojcik wrote:
>
> So to answer my own question, you wouldn't use the short version in the db if 
> you plan to do like/contains queries on them. Correct me if I'm wrong.

True. I don't think I've ever seen a case where a field had choices and
I also wanted to do like/contains queries on it. If a field has choices
set, it's likely that a more useful way to let a user search on that
field would be a fixed-choices filter rather than a keyword search.

> Unless I plan to use haystack later and index the human readable form 
> later. I think I understand now, thanks 

Right, the exception to the above would be when the value of this field
is just one field feeding into a larger keyword search on the whole
object -- and in that case I wouldn't ever do like/contains on the
original field, I'd feed its human readable form into a full text search
engine.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5491D23B.1050502%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to