Skip to content

PgTsRankWeights

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Weighs each position label when ranking. PostgreSQL raises an error for a weight above 1 and uses the default for a negative one.

public readonly struct PgTsRankWeights : IEquatable<PgTsRankWeights>

Implements: IEquatable<PgTsRankWeights>

PgTsRankWeights(float, float, float, float)

Section titled “PgTsRankWeights(float, float, float, float)”

Weighs each position label when ranking. PostgreSQL raises an error for a weight above 1 and uses the default for a negative one.

public PgTsRankWeights(float A, float B, float C, float D)

Parameters:

A — float

The weight of positions labeled A.

B — float

The weight of positions labeled B.

C — float

The weight of positions labeled C.

D — float

The weight of positions labeled D or unlabeled.

The weight of positions labeled A.

public float A { get; init; }

Value: float

The weight of positions labeled B.

public float B { get; init; }

Value: float

The weight of positions labeled C.

public float C { get; init; }

Value: float

The weight of positions labeled D or unlabeled.

public float D { get; init; }

Value: float

Gets PostgreSQL’s default weights: 1, 0.4, 0.2 and 0.1.

public static PgTsRankWeights Default { get; }

Value: PgTsRankWeights

Deconstruct(out float, out float, out float, out float)

Section titled “Deconstruct(out float, out float, out float, out float)”
public void Deconstruct(out float A, out float B, out float C, out float D)

Parameters:

A — float

B — float

C — float

D — float

public bool Equals(PgTsRankWeights other)

Parameters:

other — PgTsRankWeights

Returns: bool

public override bool Equals(object obj)

Parameters:

obj — object

Returns: bool

public override int GetHashCode()

Returns: int

public override string ToString()

Returns: string

operator ==(PgTsRankWeights, PgTsRankWeights)

Section titled “operator ==(PgTsRankWeights, PgTsRankWeights)”
public static bool operator ==(PgTsRankWeights left, PgTsRankWeights right)

Parameters:

left — PgTsRankWeights

right — PgTsRankWeights

Returns: bool

operator !=(PgTsRankWeights, PgTsRankWeights)

Section titled “operator !=(PgTsRankWeights, PgTsRankWeights)”
public static bool operator !=(PgTsRankWeights left, PgTsRankWeights right)

Parameters:

left — PgTsRankWeights

right — PgTsRankWeights

Returns: bool