Class ComplementaryFilterSearchConnector
java.lang.Object
org.exoplatform.social.core.jpa.search.ComplementaryFilterSearchConnector
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComplementaryFilterSearchConnector(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.commons.search.es.client.ElasticSearchingClient client, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService) -
Method Summary
-
Field Details
-
DEFAULT_PROFILE_INDEX
- See Also:
-
UNKNOWN_ATTRIBUTE_MESSAGE
- See Also:
-
INVALID_OBJECT_ID_MESSAGE
- See Also:
-
INVALID_MIN_COUNT_MESSAGE
- See Also:
-
-
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 onobjectIds- identity ids of the profiles to aggregate overminDocCount- minimum number of profiles sharing a value for it to be suggested- Returns:
- one row per suggested value:
key(the attribute),valueandcount - 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
-