object SearchFacet
- Alphabetic
- By Inheritance
- SearchFacet
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def combineToBson(facets: Iterable[_ <: SearchFacet]): Bson
Combines
SearchFacet
s into aBson
.Combines
SearchFacet
s into aBson
.This method may be useful when using SearchCollector.of.
- facets
The non-empty facet definitions to combine.
- returns
A
Bson
representing combinedfacets
.
- def dateFacet(name: String, path: FieldSearchPath, boundaries: Iterable[Instant]): DateSearchFacet
Returns a
SearchFacet
that allows determining the frequency of BSONDate
values in the search results by breaking the results into separate ranges.Returns a
SearchFacet
that allows determining the frequency of BSONDate
values in the search results by breaking the results into separate ranges.- name
The facet name.
- path
The path to facet on.
- boundaries
Bucket boundaries in ascending order. Must contain at least two boundaries.
- returns
The requested
SearchFacet
.
- See also
org.bson.codecs.jsr310.InstantCodec
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def numberFacet(name: String, path: FieldSearchPath, boundaries: Iterable[Number]): NumberSearchFacet
Returns a
SearchFacet
that allows determining the frequency of BSON32-bit integer
/64-bit integer
/Double
values in the search results by breaking the results into separate ranges.Returns a
SearchFacet
that allows determining the frequency of BSON32-bit integer
/64-bit integer
/Double
values in the search results by breaking the results into separate ranges.- name
The facet name.
- path
The path to facet on.
- boundaries
Bucket boundaries in ascending order. Must contain at least two boundaries.
- returns
The requested
SearchFacet
.
- See also
- def of(facet: Bson): SearchFacet
Creates a
SearchFacet
from aBson
in situations when there is no builder method that better satisfies your needs.Creates a
SearchFacet
from aBson
in situations when there is no builder method that better satisfies your needs. This method cannot be used to validate the syntax.Example
The following code creates two functionally equivalentSearchFacet
s, though they may not be equal.val facet1: SearchFacet = SearchFacet.stringFacet("facetName", SearchPath.fieldPath("fieldName")) val facet2: SearchFacet = SearchFacet.of(Document("facetName" -> Document("type" -> "string", "path" -> SearchPath.fieldPath("fieldName").toValue)))
- facet
A
Bson
representing the requiredSearchFacet
.- returns
The requested
SearchFacet
.
- def stringFacet(name: String, path: FieldSearchPath): StringSearchFacet
Returns a
SearchFacet
that allows narrowing down search results based on the most frequent BSONString
values of the specified field.Returns a
SearchFacet
that allows narrowing down search results based on the most frequent BSONString
values of the specified field.- name
The facet name.
- path
The field to facet on.
- returns
The requested
SearchFacet
.
- See also
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
This is the documentation for the MongoDB Scala driver.
Driver structure
The mongodb scala driver.
To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.
Notable packages include: