class DBFind extends AnyRef
Service class responsible for entity search
- Annotations
- @Singleton()
- Alphabetic
- By Inheritance
- DBFind
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
DBFind(configuration: Configuration, db: DBConfiguration, ec: ExecutionContext, mat: Materializer)
- Annotations
- @Inject()
- new DBFind(pageSize: Int, keepAlive: FiniteDuration, db: DBConfiguration, ec: ExecutionContext, mat: Materializer)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(query: (String) ⇒ SearchRequest): Future[SearchResponse]
Execute the search definition This function is used to run aggregations
-
def
apply(range: Option[String], sortBy: Seq[String])(query: (String) ⇒ SearchRequest): (Source[JsObject, NotUsed], Future[Long])
Search entities in ElasticSearch
Search entities in ElasticSearch
- range
first and last entities to retrieve, for example "23-42" (default value is "0-10")
- sortBy
define order of the entities by specifying field names used in sort. Fields can be prefixed by "-" for descendant or "+" for ascendant sort (ascendant by default).
- query
a function that build a SearchRequest using the index name
- returns
Source (akka stream) of JsObject. The source is materialized as future of long that contains the total number of entities.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- implicit val ec: ExecutionContext
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getOffsetAndLimitFromRange(range: Option[String]): (Int, Int)
Extract offset and limit from optional range Range has the following format : "start-end" If format is invalid of range is None, this function returns (0, 10)
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val keepAliveStr: String
- implicit val mat: Materializer
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
searchWithScroll(searchRequest: SearchRequest, offset: Int, limit: Int): (Source[SearchHit, NotUsed], Future[Long])
Execute the search definition using scroll
-
def
searchWithoutScroll(searchRequest: SearchRequest, offset: Int, limit: Int): (Source[SearchHit, NotUsed], Future[Long])
Execute the search definition
-
def
switchTo(otherDB: DBConfiguration): DBFind
return a new instance of DBFind but using another DBConfiguration
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()