Class ComplementaryFilterSearchConnector

java.lang.Object
org.exoplatform.social.core.jpa.search.ComplementaryFilterSearchConnector

public class ComplementaryFilterSearchConnector extends Object
Aggregates, over a set of indexed profiles, the values their profile properties have in common. It only ever queries the profile index it is configured with: the index is not a request parameter.
  • Field Details

  • Constructor Details

    • ComplementaryFilterSearchConnector

      public ComplementaryFilterSearchConnector(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.commons.search.es.client.ElasticSearchingClient client, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService)
  • Method Details

    • search

      public List<Map<String,String>> search(List<String> attributes, List<String> objectIds, int minDocCount)
      Parameters:
      attributes - names of profile property settings to aggregate on
      objectIds - identity ids of the profiles to aggregate over
      minDocCount - minimum number of profiles sharing a value for it to be suggested
      Returns:
      one row per suggested value: key (the attribute), value and count
      Throws:
      IllegalArgumentException - when an attribute is not a visible profile property setting (the only ones the profile index holds), an object id is not a number, or minDocCount is lower than 1; the message is a code, returned as the 400 body