Packages

o

org.mongodb.scala.model.search

SearchScoreExpression

object SearchScoreExpression

Annotations
@Beta()
Since

4.7

See also

SearchScore.function

Expressions for the function score modifier

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SearchScoreExpression
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addExpression(expressions: Iterable[_ <: SearchScoreExpression]): AddSearchScoreExpression

    Returns a SearchScoreExpression that evaluates into the sum of the values of the specified expressions.

    Returns a SearchScoreExpression that evaluates into the sum of the values of the specified expressions.

    expressions

    The expressions whose values to add. Must contain at least two expressions.

    returns

    The requested SearchScoreExpression.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  7. def constantExpression(value: Float): ConstantSearchScoreExpression

    Returns a SearchScoreExpression that evaluates into the specified value.

    Returns a SearchScoreExpression that evaluates into the specified value.

    value

    The value to use as the result of the expression. Unlike SearchScore.constant, does not have constraints.

    returns

    The requested SearchScoreExpression.

    See also

    SearchScore.constant

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def gaussExpression(origin: Double, path: PathSearchScoreExpression, scale: Double): GaussSearchScoreExpression

    Returns a SearchScoreExpression that represents a Gaussian function whose output is within the interval [0, 1].

    Returns a SearchScoreExpression that represents a Gaussian function whose output is within the interval [0, 1]. Roughly speaking, the further the value of the path expression is from the origin, the smaller the output of the function.

    The scale and decay are parameters of the Gaussian function, they define the rate at which the function decays. The input of the Gaussian function is the output of another function: max(0, abs(pathValue - origin) - offset), where pathValue is the value of the path expression.

    origin

    The point of origin, see GaussSearchScoreExpression.offset. The value of the Gaussian function is 1 if the value of the path expression is origin.

    path

    The expression whose value is used to calculate the input of the Gaussian function.

    scale

    The non-zero distance from the points origin ± offset at which the output of the Gaussian function must decay by the factor of decay.

    returns

    The requested SearchScoreExpression.

  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def log1pExpression(expression: SearchScoreExpression): Log1pSearchScoreExpression

    Returns a SearchScoreExpression that evaluates into log10(expressionValue + 1), where expressionValue is the value of the expression.

    Returns a SearchScoreExpression that evaluates into log10(expressionValue + 1), where expressionValue is the value of the expression.

    expression

    The expression whose value is used to calculate the input of the log10 function.

    returns

    The requested SearchScoreExpression.

  15. def logExpression(expression: SearchScoreExpression): LogSearchScoreExpression

    Returns a SearchScoreExpression that evaluates into log10(expressionValue), where expressionValue is the value of the expression.

    Returns a SearchScoreExpression that evaluates into log10(expressionValue), where expressionValue is the value of the expression.

    expression

    The expression whose value is the input of the log10 function.

    returns

    The requested SearchScoreExpression.

  16. def multiplyExpression(expressions: Iterable[_ <: SearchScoreExpression]): MultiplySearchScoreExpression

    Returns a SearchScoreExpression that evaluates into the product of the values of the specified expressions.

    Returns a SearchScoreExpression that evaluates into the product of the values of the specified expressions.

    expressions

    The expressions whose values to multiply. Must contain at least two expressions.

    returns

    The requested SearchScoreExpression.

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  20. def of(expression: Bson): SearchScoreExpression

    Creates a SearchScoreExpression from a Bson in situations when there is no builder method that better satisfies your needs.

    Creates a SearchScoreExpression from a Bson 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 equivalent SearchScoreExpressions, though they may not be equal.

    val expression1: SearchScoreExpression = SearchScoreExpression.pathExpression(
      SearchPath.fieldPath("fieldName"))
      .undefined(-1.5f)
    val expression2: SearchScoreExpression = SearchScoreExpression.of(Document("path" ->
      Document("value" -> SearchPath.fieldPath("fieldName").toValue,
        "undefined" -> -1.5)))
    expression

    A Bson representing the required SearchScoreExpression.

    returns

    The requested SearchScoreExpression.

  21. def pathExpression(path: FieldSearchPath): PathSearchScoreExpression

    Returns a SearchScoreExpression that evaluates into the value of the specified field.

    Returns a SearchScoreExpression that evaluates into the value of the specified field.

    path

    The numeric field whose value to use as the result of the expression.

    returns

    The requested SearchScoreExpression.

    See also

    SearchScore.boost(FieldSearchPath)

  22. def relevanceExpression(): RelevanceSearchScoreExpression

    Returns a SearchScoreExpression that evaluates into the relevance score of a document.

    Returns a SearchScoreExpression that evaluates into the relevance score of a document.

    returns

    The requested SearchScoreExpression.

  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped