com.groupbyinc.flux.index.rankeval.DiscountedCumulativeGain.class Maven / Gradle / Ivy
???? 4? ;com/groupbyinc/flux/index/rankeval/DiscountedCumulativeGain java/lang/Object 3com/groupbyinc/flux/index/rankeval/EvaluationMetric DiscountedCumulativeGain.java Bcom/groupbyinc/flux/index/rankeval/DiscountedCumulativeGain$Detail Detail 5com/groupbyinc/flux/common/xcontent/ToXContent$Params .com/groupbyinc/flux/common/xcontent/ToXContent
Params %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup normalize Z DEFAULT_K I
k unknownDocRating Ljava/lang/Integer; NAME Ljava/lang/String; dcg LOG2 D K_FIELD 'Lcom/groupbyinc/flux/common/ParseField; NORMALIZE_FIELD UNKNOWN_DOC_RATING_FIELD PARSER >Lcom/groupbyinc/flux/common/xcontent/ConstructingObjectParser; ?Lcom/groupbyinc/flux/common/xcontent/ConstructingObjectParser; ()V (ZLjava/lang/Integer;I)V * ,
- this =Lcom/groupbyinc/flux/index/rankeval/DiscountedCumulativeGain; * +
1 3 5 7 5(Lcom/groupbyinc/flux/common/io/stream/StreamInput;)V java/io/IOException : 0com/groupbyinc/flux/common/io/stream/StreamInput < readBoolean ()Z > ?
= @ readOptionalVInt ()Ljava/lang/Integer; B C
= D readVInt ()I F G
= H in 2Lcom/groupbyinc/flux/common/io/stream/StreamInput; writeTo 6(Lcom/groupbyinc/flux/common/io/stream/StreamOutput;)V 1com/groupbyinc/flux/common/io/stream/StreamOutput N writeBoolean (Z)V P Q
O R writeOptionalVInt (Ljava/lang/Integer;)V T U
O V writeVInt (I)V X Y
O Z out 3Lcom/groupbyinc/flux/common/io/stream/StreamOutput; getWriteableName ()Ljava/lang/String; getNormalize getK getUnknownDocRating forcedSearchSize ()Ljava/util/Optional; java/lang/Integer e valueOf (I)Ljava/lang/Integer; g h
f i java/util/Optional k of ((Ljava/lang/Object;)Ljava/util/Optional; m n
l o evaluate ?(Ljava/lang/String;[Lcom/groupbyinc/flux/search/SearchHit;Ljava/util/List;)Lcom/groupbyinc/flux/index/rankeval/EvalQueryQuality; joinHitsWithRatings I([Lcom/groupbyinc/flux/search/SearchHit;Ljava/util/List;)Ljava/util/List; s t u java/util/ArrayList w java/util/List y size { G z | * Y
x ~ iterator ()Ljava/util/Iterator; ? ? z ? java/lang/String ? '[Lcom/groupbyinc/flux/search/SearchHit; ? java/util/Iterator ? hasNext ? ? ? ? next ()Ljava/lang/Object; ? ? ? ? 1com/groupbyinc/flux/index/rankeval/RatedSearchHit ? getRating ? d
? ? orElse &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
l ? add (Ljava/lang/Object;)Z ? ? z ? isPresent ? ?
l ?
computeDCG (Ljava/util/List;)D ? ?
? stream ()Ljava/util/stream/Stream; ? ? z ? "java/lang/invoke/LambdaMetafactory ? metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; ? ?
? ? ? (Ljava/lang/Object;)I ? 0com/groupbyinc/flux/index/rankeval/RatedDocument ? ? G
? ? ? 5(Lcom/groupbyinc/flux/index/rankeval/RatedDocument;)I ?
applyAsInt $()Ljava/util/function/ToIntFunction; ? ? ? java/util/stream/Stream ? mapToInt @(Ljava/util/function/ToIntFunction;)Ljava/util/stream/IntStream; ? ? ? ? java/util/stream/IntStream ? boxed ? ? ? ? java/util/stream/Collectors ? toList ()Ljava/util/stream/Collector; ? ?
? ? collect 0(Ljava/util/stream/Collector;)Ljava/lang/Object; ? ? ? ? java/util/Collections ? reverseOrder ()Ljava/util/Comparator; ? ?
? ? java/util/Comparator ? nullsLast .(Ljava/util/Comparator;)Ljava/util/Comparator; ? ? ? ? sort )(Ljava/util/List;Ljava/util/Comparator;)V ? ?
? ? java/lang/Math ? min (II)I ? ?
? ? subList (II)Ljava/util/List; ? ? z ? 3com/groupbyinc/flux/index/rankeval/EvalQueryQuality ? (Ljava/lang/String;D)V * ?
? ? addHitsAndRatings (Ljava/util/List;)V ? ?
? ? (DDI)V * ?
? setMetricDetails 4(Lcom/groupbyinc/flux/index/rankeval/MetricDetail;)V ? ?
? ? hit 3Lcom/groupbyinc/flux/index/rankeval/RatedSearchHit;
allRatings %Ljava/util/List; Ljava/util/List; taskId hits ratedDocs DLjava/util/List; ratedHits ELjava/util/List; ratingsInSearchHits unratedResults result idcg evalQueryQuality 5Lcom/groupbyinc/flux/index/rankeval/EvalQueryQuality;@ intValue G
f pow (DD)D
? log (D)D
? ! " rating ratings rank fromXContent s(Lcom/groupbyinc/flux/common/xcontent/XContentParser;)Lcom/groupbyinc/flux/index/rankeval/DiscountedCumulativeGain; ' ( !