DecayFunction

zio.elasticsearch.query.DecayFunction
final case class DecayFunction[S](field: String, decayFunctionType: DecayFunctionType, origin: String, scale: String, decay: Option[Double], filter: Option[ElasticQuery[S]], multiValueMode: Option[MultiValueMode], offset: Option[String], weight: Option[Double]) extends FunctionScoreFunction[S]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type

Members list

Value members

Concrete methods

def decay(value: Double): DecayFunction[S]

Sets the decay parameter for the zio.elasticsearch.query.DecayFunction. It defines how documents are scored at the distance given at scale. If no decay is defined, documents at the distance scale will be scored 0.5.

Sets the decay parameter for the zio.elasticsearch.query.DecayFunction. It defines how documents are scored at the distance given at scale. If no decay is defined, documents at the distance scale will be scored 0.5.

Value parameters

value

a non-negative real number value for the decay parameter

Attributes

Returns

an instance of zio.elasticsearch.query.DecayFunction enriched with the decay parameter.

def filter[S1 <: S : Schema](filter: ElasticQuery[S1]): DecayFunction[S1]

Sets the filter parameter for the zio.elasticsearch.query.FunctionScoreFunction.

Sets the filter parameter for the zio.elasticsearch.query.FunctionScoreFunction.

Type parameters

S1

the type of query used in filter, requires implicit zio.schema.Schema in scope

Value parameters

filter

the zio.elasticsearch.query.ElasticQuery used for filtering

Attributes

Returns

an instance of zio.elasticsearch.query.FunctionScoreFunction that can be used in zio.elasticsearch.query.FunctionScoreQuery to be performed enriched with the filter parameter.

def filter(filter: ElasticQuery[Any]): DecayFunction[Any]

Sets the filter parameter for the zio.elasticsearch.query.FunctionScoreFunction.

Sets the filter parameter for the zio.elasticsearch.query.FunctionScoreFunction.

Value parameters

filter

the zio.elasticsearch.query.ElasticQuery used for filtering

Attributes

Returns

an instance of zio.elasticsearch.query.FunctionScoreFunction that can be used in zio.elasticsearch.query.FunctionScoreQuery to be performed enriched with the filter parameter.

Sets the multiValueMode parameter for the zio.elasticsearch.query.DecayFunction. If a field used for computing the decay contains multiple values, per default the value closest to the origin is chosen for determining the distance. This can be changed by setting multiValueMode.

Sets the multiValueMode parameter for the zio.elasticsearch.query.DecayFunction. If a field used for computing the decay contains multiple values, per default the value closest to the origin is chosen for determining the distance. This can be changed by setting multiValueMode.

Value parameters

value

the zio.elasticsearch.query.MultiValueMode value for multiValueMode parameter, it can have following values:

Attributes

Returns

an instance of zio.elasticsearch.query.DecayFunction enriched with the multiValueMode parameter.

def offset(value: String): DecayFunction[S]

Sets the offset parameter for the zio.elasticsearch.query.DecayFunction. If an offset is defined, the decay function will only compute the decay function for documents with a distance greater than the defined offset. The default is 0.

Sets the offset parameter for the zio.elasticsearch.query.DecayFunction. If an offset is defined, the decay function will only compute the decay function for documents with a distance greater than the defined offset. The default is 0.

Value parameters

value

the text value for the offset parameter

Attributes

Returns

an instance of zio.elasticsearch.query.DecayFunction enriched with the offset parameter.

def weight(value: Double): DecayFunction[S]

Sets the weight parameter for the zio.elasticsearch.query.DecayFunction. The weight score allows you to multiply the score by the provided weight.

Sets the weight parameter for the zio.elasticsearch.query.DecayFunction. The weight score allows you to multiply the score by the provided weight.

Value parameters

value

a non-negative real number value for the weight parameter

Attributes

Returns

an instance of zio.elasticsearch.query.DecayFunction enriched with the weight parameter.

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product