FieldValueFactor

zio.elasticsearch.query.FieldValueFactor
final case class FieldValueFactor[S](field: String, factor: Option[Double], filter: Option[ElasticQuery[S]], modifier: Option[FieldValueFactorFunctionModifier], missing: Option[Double], 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 factor(value: Double): FieldValueFactor[S]

Sets the factor parameter for the zio.elasticsearch.query.FieldValueFactor. Optional factor to multiply the field value with, defaults to 1.

Sets the factor parameter for the zio.elasticsearch.query.FieldValueFactor. Optional factor to multiply the field value with, defaults to 1.

Value parameters

value

a non-negative real number value for the factor parameter

Attributes

Returns

an instance of zio.elasticsearch.query.FieldValueFactor enriched with the factor parameter.

def filter(value: ElasticQuery[Any]): FieldValueFactor[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.

def filter[S1 <: S : Schema](filter: ElasticQuery[S1]): FieldValueFactor[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 missing(value: Double): FieldValueFactor[S]

Sets the missing parameter for the zio.elasticsearch.query.FieldValueFactor. Value used if the document does not have that field. The modifier and factor are still applied to it as though it were read from the document.

Sets the missing parameter for the zio.elasticsearch.query.FieldValueFactor. Value used if the document does not have that field. The modifier and factor are still applied to it as though it were read from the document.

Value parameters

value

a non-negative real number value for the missing parameter

Attributes

Returns

an instance of zio.elasticsearch.query.FieldValueFactor enriched with the missing parameter.

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

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

Sets the weight parameter for the zio.elasticsearch.query.FieldValueFactor. 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.FieldValueFactor enriched with the weight parameter.

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product