Get all 5 groups in LiveSearch results

Bug #330742 reported by Paul Everitt
4
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Medium
Paul Everitt

Bug Description

Our LiveSearch groups currently only number 3: People, Pages, and Posts.

We need 5: People, Posts, Pages, Files, Other.

After talking with Chris a few weeks ago about groupings by interface, the ICommunityContent thing, etc., he said we need to put much of that on the chopping block and simplify it. Thus, we have some technical debt to pay down before we can fix the LiveSearch widget groups.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Alas, technical debt on this starts with Chris writing down what needs to be tossed out and kept.

Changed in karl3:
assignee: nobody → chrism-plope
importance: Undecided → Medium
milestone: none → m3
Revision history for this message
Chris McDonough (chrism-plope) wrote :

Basically we need to dynamicize the list of groups instead of having some fixed number.

One way to do this would be to create a set of lemonade listitems in this form:

  <lemonade:listitem
     component=".livesearch.peoplesearch"
     provides="karl.models.interfaces.IGroupSearch"
     name="People"
     title="People"
     description="People group"
     sort_key="10"
     />
  <lemonade:listitem
     component=".livesearch.postsearch"
     provides="karl.models.interfaces.IGroupSearch"
     name="Posts"
     title="Posts"
     description="Posts group"
     sort_key="20"
     />

.. and so on.

"livesearch.peoplesearch" would be a utility that would do a catalog query based on arbitrary query terms (a canned query) and return some number of results. Same for "livesearch.postsearch". When we wanted to show the spotlightish dropdown, we'd iterate over all utilities providing IGroupSearch, and call a method on each of them that returned a set of results, which would represent the list of stuff we wanted for that group.

The downside to this is that it will perform N catalog queries where N is the number of search groups, but I suspect that may be the only sane way to do it.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Moving out of M3.

Changed in karl3:
milestone: m3 → m4
Revision history for this message
Chris McDonough (chrism-plope) wrote :

I've configur-ified the live search groups. Each lemonade:listitem in zcml that 'provides' "karl.models.interfaces.IGroupSearchFactory" represents a group. Each listitem points at a utility implementation (the "component") that returns something that implements karl.models.interfaces.IGroupSearch. Currently there are still only three working ones. I don't know how to spell the other two query-wise.

Changed in karl3:
assignee: chrism-plope → paul-agendaless
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

Chris did the part needed for M3. Closing this issue, as we actually implement things in later milestones, we'll make tasks for more stuff in more groups.

Changed in karl3:
status: New → Fix Committed
Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.