Enum elasticsearch_dsl::search::queries::params::Function [−][src]
pub enum Function {
Show 14 variants
Weight(Weight),
RandomScore(RandomScore),
FieldValueFactor(FieldValueFactor),
DecayDateTime(Decay<DateTime<Utc>>),
DecayLocation(Decay<GeoPoint>),
DecayI8(Decay<i8>),
DecayI16(Decay<i16>),
DecayI32(Decay<i32>),
DecayI64(Decay<i64>),
DecayU8(Decay<u8>),
DecayU16(Decay<u16>),
DecayU32(Decay<u32>),
DecayU64(Decay<u64>),
Script(Script),
}
Expand description
Functions available for use in FunctionScoreQuery
Variants
Weight(Weight)
Tuple Fields
0: Weight
RandomScore(RandomScore)
Tuple Fields
0: RandomScore
FieldValueFactor(FieldValueFactor)
Tuple Fields
DecayDateTime(Decay<DateTime<Utc>>)
DecayLocation(Decay<GeoPoint>)
DecayI8(Decay<i8>)
DecayI16(Decay<i16>)
DecayI32(Decay<i32>)
DecayI64(Decay<i64>)
DecayU8(Decay<u8>)
DecayU16(Decay<u16>)
DecayU32(Decay<u32>)
DecayU64(Decay<u64>)
Script(Script)
Tuple Fields
0: Script
Implementations
Creates an instance of RandomScore
Creates an instance of FieldValueFactor
field
- Field to be extracted from the document.
Creates an instance of Decay
function
- Decay function variantfield
- Field to apply function toorigin
- The point of origin used for calculating distance. Must be given as a number for numeric field, date for date fields and geo point for geo fields. Required for geo and numeric field. For date fields the default isnow
. Date math (for example now-1h) is supported for origin.scale
- Required for all types. Defines the distance from origin + offset at which the computed score will equaldecay
parameter. For geo fields: Can be defined as number+unit (1km, 12m,…). Default unit is meters. For date fields: Can to be defined as a number+unit (“1h”, “10d”,…). Default unit is milliseconds. For numeric field: Any number.
Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Function
impl UnwindSafe for Function
Blanket Implementations
Mutably borrows from an owned value. Read more