0

When I call communityService.getMyCommunities(params) or communityService.getPublicCommunities(params) or communityService.getSubCommunities(parentCommunity, params) I would expect that filling params with e. g. tags=[mytag,yourtag] the call would only lookup communities having at least one of these tags (or both, however).

But to me it looks like this param ("tags") is simply ignored, and I always receive all communities of the given category (my / public / sub).

In case of having lots of communities of the requested category this massively slows down performance when I only want to retrieve communities with e. g. one certain tag: I receive all data over the net and must filter / lookup the received object list locally.

What am I doing wrong?

Is there something missing in the SDK implementation?

  • i believe the key is tag= and not the search tags=[tag1,tag2] – Paul Bastide Jul 22 '14 at 12:32
  • See also https://github.com/OpenNTF/SocialSDK/issues/1600 – Christian Gosch Jul 22 '14 at 12:34
  • @Paul Bastide: I will give it a try, if it is not yet this "name", and report here, what I am actually using exactly. (Have no access to the implementation this minute.) – Christian Gosch Jul 22 '14 at 12:35
  • On github it is said that filtering by tags is not possible for the Communities fetch operations. It seems that one can only fetch 1 community by ID, or my/public/sub communities completely. -- Corrections from the developers? – Christian Gosch Jul 29 '14 at 15:25
  • use this... https://apps.na.collabserv.com/search/web/search?scope=allconnections&scope=communities&constraint={%22type%22%3A%22category%22%2C%22values%22%3A[%22Tag%2FtagName%22]}&query= Note you'll have to change your tag (tagName) – Paul Bastide Jul 29 '14 at 15:28
  • You mean URLencode of: `{"type":"category","values":["Tag/tagName"]}&query=` ? As part of a GET request: Where must that be? Could you pls. show an example URL? – Christian Gosch Jul 31 '14 at 08:52
  • it was easier to add an answer – Paul Bastide Jul 31 '14 at 12:34

1 Answers1

0

As part of the communities/my api, you cannot do any filtering... you need to use Search APIs.

In order to get a filtered list of communities based on the tags, you need to make a request to the following URL.

https://apps.na.collabserv.com/search/atom/mysearch?scope=personalOnly&scope=communities&query=&constraint={%22type%22%3A%22category%22%2C%22values%22%3A[%22Tag%2Fprb%22]}&page=1&pageSize=10

Yes, it is URL encoded, you can then change prb to match your tag, and you can repeat the constraints for each tag

You can also reference Link to Search API Constraints

Paul Bastide
  • 1,505
  • 4
  • 17
  • 22
  • Perfect -- Thanks! :-) But this is not available via IBM SBT SDK, right? So I must make use of plain REST, right? What comes back then? Can the result be deserialized by means of IBM SBT SDK? (If so, the request could be built into IBM SBT SDK related code...) – Christian Gosch Aug 01 '14 at 13:30
  • TEMPORARY COMMENT: I can check that for my project not before Aug 17, 2014. Thus I cannot confirm it as the right answer before that date. (This comment will be removed after that date.) – Christian Gosch Aug 01 '14 at 13:34