com.groupbyinc.flux.index.similarity.SimilarityService.class Maven / Gradle / Ivy
???? 4? 6com/groupbyinc/flux/index/similarity/SimilarityService 0com/groupbyinc/flux/index/AbstractIndexComponent SimilarityService.java Icom/groupbyinc/flux/index/similarity/SimilarityService$PerFieldSimilarity PerFieldSimilarity java/util/Map$Entry
java/util/Map Entry %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup DEPRECATION_LOGGER 6Lcom/groupbyinc/flux/common/logging/DeprecationLogger; DEFAULT_SIMILARITY Ljava/lang/String; BM25 CLASSIC_SIMILARITY classic DEFAULTS Ljava/util/Map; ?Ljava/util/Map;>;>; BUILT_INLjava/util/Map;>; defaultSimilarity ILcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity; similarities ?Ljava/util/Map;>; e(Lcom/groupbyinc/flux/index/IndexSettings;Lcom/groupbyinc/flux/script/ScriptService;Ljava/util/Map;)V ,(Lcom/groupbyinc/flux/index/IndexSettings;)V % '
( java/util/HashMap * size ()I , - . (I)V % 0
+ 1
indexSettings )Lcom/groupbyinc/flux/index/IndexSettings; 3 4 5 'com/groupbyinc/flux/index/IndexSettings 7 getSettings 0()Lcom/groupbyinc/flux/common/settings/Settings; 9 :
8 ; index.similarity = ,com/groupbyinc/flux/common/settings/Settings ? getGroups #(Ljava/lang/String;)Ljava/util/Map; A B
@ C entrySet ()Ljava/util/Set; E F G
java/util/Set I iterator ()Ljava/util/Iterator; K L J M (com/groupbyinc/flux/script/ScriptService O java/util/Iterator Q hasNext ()Z S T R U next ()Ljava/lang/Object; W X R Y getKey [ X
\ java/lang/String ^ ` containsKey (Ljava/lang/Object;)Z b c d getIndexVersionCreated ()Lcom/groupbyinc/flux/Version; f g
8 h com/groupbyinc/flux/Version j V_5_0_0_alpha1 Lcom/groupbyinc/flux/Version; l m k n onOrAfter (Lcom/groupbyinc/flux/Version;)Z p q
k r "java/lang/IllegalArgumentException t java/lang/StringBuilder v ()V % x
w y %Cannot redefine built-in Similarity [ { append -(Ljava/lang/String;)Ljava/lang/StringBuilder; } ~
w ] ? toString ()Ljava/lang/String; ? ?
w ? (Ljava/lang/String;)V % ?
u ? getValue ? X
? type ? get &(Ljava/lang/String;)Ljava/lang/String; ? ?
@ ? Similarity [ ? ] must have an associated type ? Unknown Similarity type [ ? ] for [ ? &(Ljava/lang/Object;)Ljava/lang/Object; ? ? ? &com/groupbyinc/flux/common/TriFunction ? getOrDefault 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? apply J(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? ? Gcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity ? "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; ? ?
? ? ? X
lambda$new$14 ?(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity; ? ?
? ? K()Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity; ? h(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity;)Ljava/util/function/Supplier; ? ? ? put ? ? ? ? java/util/function/Function ? ? ? ? ? java/util/function/Supplier ? # ? default ? ? X ? ? ! " ? base ? ? WThe [base] similarity is ignored since query normalization and coords have been removed ? java/lang/Object ? 4com/groupbyinc/flux/common/logging/DeprecationLogger ?
deprecated ((Ljava/lang/String;[Ljava/lang/Object;)V ? ?
? ? name providerSettings .Lcom/groupbyinc/flux/common/settings/Settings; typeName defaultFactory ?Lcom/groupbyinc/flux/common/TriFunction; (Lcom/groupbyinc/flux/common/TriFunction; factory
similarity entry WLjava/util/Map$Entry; Ljava/util/Map$Entry; ?Ljava/util/Map$Entry;>;>; this 8Lcom/groupbyinc/flux/index/similarity/SimilarityService;
scriptService *Lcom/groupbyinc/flux/script/ScriptService; providers similaritySettings QLjava/util/Map; {(Lcom/groupbyinc/flux/index/mapper/MapperService;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity; |(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity;Lcom/groupbyinc/flux/index/mapper/MapperService;)V % ?
?
mapperService 0Lcom/groupbyinc/flux/index/mapper/MapperService;
getSimilarity M(Ljava/lang/String;)Lcom/groupbyinc/flux/index/similarity/SimilarityProvider; 7com/groupbyinc/flux/index/similarity/SimilarityProvider ? ^(Ljava/lang/String;Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity;)V % ?
? ? sim hLjava/util/function/Supplier; Ljava/util/function/Supplier; getDefaultSimilarity lambda$static$13 ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;Lcom/groupbyinc/flux/script/ScriptService;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity; 8com/groupbyinc/flux/index/similarity/SimilarityProviders createDfiSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/DFISimilarity;
settings version lambda$static$12 createLMJelinekMercerSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/LMJelinekMercerSimilarity;
lambda$static$11 createLMDirichletSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/LMDirichletSimilarity;
lambda$static$10 createIBSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/IBSimilarity;
lambda$static$9 createDfrSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/DFRSimilarity;
lambda$static$8 createBooleanSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/BooleanSimilarity;!"
# lambda$static$7 createBM25Similarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/BM25Similarity;&'
( lambda$static$6 ?The [classic] similarity is now deprecated in favour of BM25, which is generally accepted as a better alternative. Use the [BM25] similarity or build a custom [scripted] similarity instead.+ createClassicSimilarity ?(Lcom/groupbyinc/flux/common/settings/Settings;Lcom/groupbyinc/flux/Version;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/ClassicSimilarity;-.
/ script lambda$static$5 <(Lcom/groupbyinc/flux/Version;)Ljava/util/function/Supplier; Ncom/groupbyinc/flux/common/apache/lucene/search/similarities/BooleanSimilarity4
5 y lambda$static$47 ?
89 ? lambda$static$3 EMPTY= ? @> lambda$static$2 ?(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/BM25Similarity;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity;@A
BC l(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/BM25Similarity;)Ljava/util/function/Supplier; ?E F MLcom/groupbyinc/flux/common/apache/lucene/search/similarities/BM25Similarity; lambda$static$1 lambda$static$0 ?(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/ClassicSimilarity;)Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/Similarity;JK
LM o(Lcom/groupbyinc/flux/common/apache/lucene/search/similarities/ClassicSimilarity;)Ljava/util/function/Supplier; ?O P PLcom/groupbyinc/flux/common/apache/lucene/search/similarities/ClassicSimilarity; *com/groupbyinc/flux/common/logging/LoggersT getLogger 4(Ljava/lang/Class;)Lorg/apache/logging/log4j/Logger;VW
UX $(Lorg/apache/logging/log4j/Logger;)V %Z
?[
+ y ?I3
_`3 ()Ljava/util/function/Function; ?c d<3
fg d booleanj23
lm d ?*
qr *()Lcom/groupbyinc/flux/common/TriFunction; ?u v%
xy v
|} v DFR?
??
v IB?
?? v LMDirichlet?
?? v LMJelinekMercer?
??
v DFI?
?? v scripted? ?com/groupbyinc/flux/index/similarity/ScriptedSimilarityProvider?
? y java/util/Collections? unmodifiableMap (Ljava/util/Map;)Ljava/util/Map;??
?? defaults builtIn
ConstantValue Signature Code LocalVariableTable LocalVariableTypeTable LineNumberTable
StackMapTablea(Lcom/groupbyinc/flux/index/IndexSettings;Lcom/groupbyinc/flux/script/ScriptService;Ljava/util/Map;>;)V BootstrapMethods
SourceFile InnerClasses 1 ? ? ? ? ! " # ? $ % &