Josh@: It is not redundant. The filter
  keywords = filter(None, keywords)
is helpful because if you write to searchbox only non alphanumerical
characters (e.g. one comma) it is changed by "strip(punctuation)" to
empty string and you get query
   ... UPPER(columnname) LIKE UPPER(E'%%') ...
and you eventually go out of memory or get timeout for a big database.

I limit however number of results usually by a slice in templates/shop/
search.html
  {% for category in results.categories|slice:":200" %}
...
  {% for product in results.products|slice:":200" %}
So, it would by load only for database, not for template system and
web browser, which would be worse.

Did you read my question about displayig keywords back to searchbox?
(above)
How it is done in Mezzanine?

Hynek

Josh Cartmell wrote:
> Hey Hynekcer, I like your updates and incorporated them.  I also removed
> the keywords = filter(None, keywords) as I think it is redundant and
> unnecessary, I'm not totally sure on that because I'm not exactly sure
> what purpose it was serving there. If someone could enlighten me or
> confirm that it is unnecessary I would appreciate it.  Search continues
> to function without it.
>
> -Josh

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/satchmo-users?hl=en.

Reply via email to