object SearchScoreExpression
- Annotations
- @Beta()
- Since
4.7
- See also
- Alphabetic
- By Inheritance
- SearchScoreExpression
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
addExpression(expressions: Iterable[_ <: SearchScoreExpression]): AddSearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into the sum of the values of the specifiedexpressions.Returns a
SearchScoreExpressionthat evaluates into the sum of the values of the specifiedexpressions.- expressions
The expressions whose values to add. Must contain at least two expressions.
- returns
The requested
SearchScoreExpression.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
def
constantExpression(value: Float): ConstantSearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into the specifiedvalue.Returns a
SearchScoreExpressionthat evaluates into the specifiedvalue.- value
The value to use as the result of the expression. Unlike SearchScore.constant, does not have constraints.
- returns
The requested
SearchScoreExpression.
- See also
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
gaussExpression(origin: Double, path: PathSearchScoreExpression, scale: Double): GaussSearchScoreExpression
Returns a
SearchScoreExpressionthat represents a Gaussian function whose output is within the interval [0, 1].Returns a
SearchScoreExpressionthat represents a Gaussian function whose output is within the interval [0, 1]. Roughly speaking, the further the value of thepathexpression is from theorigin, the smaller the output of the function.The
scaleanddecayare 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), wherepathValueis the value of thepathexpression.- origin
The point of origin, see
GaussSearchScoreExpression.offset. The value of the Gaussian function is 1 if the value of thepathexpression isorigin.- path
The expression whose value is used to calculate the input of the Gaussian function.
- scale
The non-zero distance from the points
origin±offsetat which the output of the Gaussian function must decay by the factor ofdecay.- returns
The requested
SearchScoreExpression.
-
final
def
getClass(): Class[_]
- 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
-
def
log1pExpression(expression: SearchScoreExpression): Log1pSearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into log10(expressionValue+ 1), whereexpressionValueis the value of theexpression.Returns a
SearchScoreExpressionthat evaluates into log10(expressionValue+ 1), whereexpressionValueis the value of theexpression.- expression
The expression whose value is used to calculate the input of the log10 function.
- returns
The requested
SearchScoreExpression.
-
def
logExpression(expression: SearchScoreExpression): LogSearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into log10(expressionValue), whereexpressionValueis the value of theexpression.Returns a
SearchScoreExpressionthat evaluates into log10(expressionValue), whereexpressionValueis the value of theexpression.- expression
The expression whose value is the input of the log10 function.
- returns
The requested
SearchScoreExpression.
-
def
multiplyExpression(expressions: Iterable[_ <: SearchScoreExpression]): MultiplySearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into the product of the values of the specifiedexpressions.Returns a
SearchScoreExpressionthat evaluates into the product of the values of the specifiedexpressions.- expressions
The expressions whose values to multiply. Must contain at least two expressions.
- returns
The requested
SearchScoreExpression.
-
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
of(expression: Bson): SearchScoreExpression
Creates a
SearchScoreExpressionfrom aBsonin situations when there is no builder method that better satisfies your needs.Creates a
SearchScoreExpressionfrom aBsonin 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 equivalentSearchScoreExpressions, 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
Bsonrepresenting the requiredSearchScoreExpression.- returns
The requested
SearchScoreExpression.
-
def
pathExpression(path: FieldSearchPath): PathSearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into the value of the specified field.Returns a
SearchScoreExpressionthat 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)
-
def
relevanceExpression(): RelevanceSearchScoreExpression
Returns a
SearchScoreExpressionthat evaluates into the relevance score of a document.Returns a
SearchScoreExpressionthat evaluates into the relevance score of a document.- returns
The requested
SearchScoreExpression.
-
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( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated