Class

models.services

ESAggregateService

Related Doc: package services

Permalink

class ESAggregateService extends AggregateService

Implementation of models.services.AggregateService using an elasticsearch index as backend.

See also

See ES documentation for more information.

Linear Supertypes
AggregateService, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ESAggregateService
  2. AggregateService
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ESAggregateService(clientService: SearchClientService, utils: ESRequestUtils)

    Permalink

    clientService

    the elasticsearch client.

    utils

    common helper to issue elasticsearch queries.

    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aggregate(facets: Facets, aggregateKey: String, size: Int, include: List[String], exclude: List[String])(index: String): Aggregation

    Permalink

    Creates multiple buckets - one per unique value that is associated with the given key.

    Creates multiple buckets - one per unique value that is associated with the given key.

    The following snippet will create five buckets. Each bucket represents one of the five most occurring recipient names that are associated with a document and match the empty filter:

    aggregate(Facets.empty, "Recipient_names", 5, Nil, Nil)("enron")

    Use models.services.DocumentService#getMetadataKeys in order to retrieve the available aggregation keys for the underlying collection.

    facets

    the search query.

    aggregateKey

    the key that belongs to the aggregated values.

    size

    the number of unique models.MetaDataBucket to create.

    include

    a list of values to filter the result. The result will only contain the models.MetaDataBucket associated with one of the keys given in this list. The size parameter is ignored when given a non empty include list.

    exclude

    a list of values that should be excluded from the result. The result will contain no models.MetaDataBucket associated with one of the keys given in this list.

    index

    the data source index or database name to query.

    returns

    an instance of models.Aggregation with size models.MetaDataBucket matching the given filters and using the aggregationKey.

    Definition Classes
    ESAggregateServiceAggregateService
  5. def aggregateAll(facets: Facets, size: Int, keyExclusion: List[String])(index: String): List[Aggregation]

    Permalink

    Creates multiple aggregations - one for each metadata from the underlying collection.

    Creates multiple aggregations - one for each metadata from the underlying collection.

    facets

    the search query.

    size

    the number of unique models.MetaDataBucket to create. The size is the same for all aggregations.

    keyExclusion

    a list of metadata keys that should be excluded from the aggregation.

    index

    the data source index or database name to query.

    returns

    a list of models.Aggregation. Each with size models.MetaDataBucket matching the given filters.

    Definition Classes
    ESAggregateServiceAggregateService
  6. def aggregateEntities(facets: Facets, size: Int, include: List[Long], exclude: List[Long])(index: String): Aggregation

    Permalink

    Creates multiple buckets - one per unique entity.

    Creates multiple buckets - one per unique entity.

    Each document has a list of co-occurring entities, which is used to build this aggregation.

    The following snippet will create five buckets. Each bucket represents one of the five most occurring entity ids that are associated with a document and match the empty filter:

    aggregateEntities(Facets.empty, 5, Nil, Nil)("enron")
    facets

    the search query.

    size

    the number of unique models.NodeBucket to create.

    include

    a list of values to filter the result. The result will only contain the models.NodeBucket associated with one of the keys given in this list. The size parameter is ignored when given a non empty include list.

    exclude

    a list of values that should be excluded from the result. The result will contain no models.NodeBucket associated with one of the keys given in this list.

    index

    the data source index or database name to query.

    returns

    an instance of models.Aggregation with size models.NodeBucket representing most occurring entities in the underlying collection.

    Definition Classes
    ESAggregateServiceAggregateService
  7. def aggregateEntitiesByType(facets: Facets, etype: String, size: Int, include: List[Long], exclude: List[Long])(index: String): Aggregation

    Permalink

    Creates multiple buckets - one per unique entity.

    Creates multiple buckets - one per unique entity. The aggregation only considers entities belonging to the given type.

    facets

    the search query.

    etype

    the entity type to filter for.

    size

    the number of unique models.NodeBucket to create.

    include

    a list of values to filter the result. The result will only contain the models.NodeBucket associated with one of the keys given in this list. The size parameter is ignored when given a non empty include list.

    exclude

    a list of values that should be excluded from the result. The result will contain no models.NodeBucket associated with one of the keys given in this list.

    index

    the data source index or database name to query.

    returns

    an instance of models.Aggregation with size models.NodeBucket representing most occurring entities of the given type in the underlying collection.

    Definition Classes
    ESAggregateServiceAggregateService
  8. def aggregateKeywords(facets: Facets, size: Int, include: List[String], exclude: List[String])(index: String): Aggregation

    Permalink

    Creates multiple buckets - one per unique keyword.

    Creates multiple buckets - one per unique keyword.

    Each document has a list important keywords, which is used to build this aggregation.

    facets

    the search query.

    size

    the number of unique models.MetaDataBucket to create.

    include

    a list of values to filter the result. The result will only contain the models.MetaDataBucket associated with one of the keys given in this list. The size parameter is ignored when given a non empty include list.

    exclude

    a list of values that should be excluded from the result. The result will contain no models.MetaDataBucket associated with one of the keys given in this list.

    index

    the data source index or database name to query.

    returns

    an instance of models.Aggregation with size models.MetaDataBucket representing most occurring entities in the underlying collection.

    Definition Classes
    ESAggregateServiceAggregateService
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AggregateService

Inherited from AnyRef

Inherited from Any

Ungrouped