[buddypress-trac] [BuddyPress] #4591: search and Get Groups by Group Meta

buddypress-trac noreply at wordpress.org
Tue Nov 27 18:54:05 UTC 2012


#4591: search and Get Groups by Group Meta
------------------------------------+-----------------------------
 Reporter:  DennisSmolek            |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Future Release
Component:  Groups                  |     Version:  1.7
 Severity:  normal                  |  Resolution:
 Keywords:  dev-feedback has-patch  |
------------------------------------+-----------------------------

Comment (by boonebgorges):

 Thanks for the first patch, DennisSmolek.

 You're right that the queries are built differently, which is kinda dumb.
 In the future we'll probably build a BP_Group_Query class along the lines
 of the new `BP_User_Query`, which'll fix some of these inconsistencies.

 For this patch, we should probably only be performing the extra groupmeta
 join if there are actually search terms present, since these joins are
 pretty slow.

 It would also be nice to have real `meta_key`/`meta_value` support - this
 patch doesn't attempt that. I don't think we necessarily have to introduce
 it all at the same time, of course. We could wait and shoot for a real
 `meta_query` in BP 1.8.

 If the patch is applied as-is, it may result in some odd behavior, as when
 groupmeta is used to store numerical values. If you search for '2', for
 example, it would be odd if you got back group results where some random
 groupmeta iterator was '2' (like the member count). Maybe this is an edge
 case, but it's a bit worrisome. If we had proper `meta_query`
 functionality, we could just skip the `search_terms` join, and require
 proper meta queries for this sort of thing.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4591#comment:3>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list