Class ProfileSearchConnector
java.lang.Object
org.exoplatform.social.core.jpa.search.ProfileSearchConnector
-
Constructor Summary
ConstructorsConstructorDescriptionProfileSearchConnector(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.commons.search.es.client.ElasticSearchingClient client, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, UserPermissionService userPermissionService) -
Method Summary
Modifier and TypeMethodDescriptionintcount(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.profile.ProfileFilter filter, org.exoplatform.social.core.relationship.model.Relationship.Type type) TODO it will be remove to use "_count" querystatic StringescapeESReservedChars(String string) Escapes a value for a query_string query written inside a JSON string, at two levels: each query_string reserved character is escaped once, then the result is escaped for JSON, so that a backslash, a slash or a double quote in the value reaches Elasticsearch as a literal character.search(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.profile.ProfileFilter filter, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit)
-
Constructor Details
-
ProfileSearchConnector
public ProfileSearchConnector(org.exoplatform.container.xml.InitParams initParams, org.exoplatform.commons.search.es.client.ElasticSearchingClient client, org.exoplatform.social.core.profileproperty.ProfilePropertyService profilePropertyService, UserPermissionService userPermissionService)
-
-
Method Details
-
search
-
count
public int count(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.profile.ProfileFilter filter, org.exoplatform.social.core.relationship.model.Relationship.Type type) TODO it will be remove to use "_count" query- Parameters:
identity- the Identityfilter- the filtertype- type- Returns:
- number of identities
-
escapeESReservedChars
Escapes a value for a query_string query written inside a JSON string, at two levels: each query_string reserved character is escaped once, then the result is escaped for JSON, so that a backslash, a slash or a double quote in the value reaches Elasticsearch as a literal character.- Parameters:
string- value to search for- Returns:
- the value to write between the quotes of the query JSON string
-