public class org.apache.lucene.search.similarities.BM25Similarity extends org.apache.lucene.search.similarities.Similarity
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.lucene.search.similarities.BM25Similarity
super_class: org.apache.lucene.search.similarities.Similarity
{
private final float k1;
descriptor: F
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final float b;
descriptor: F
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
protected boolean discountOverlaps;
descriptor: Z
flags: (0x0004) ACC_PROTECTED
private static final float[] LENGTH_TABLE;
descriptor: [F
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: sipush 256
newarray 6
putstatic org.apache.lucene.search.similarities.BM25Similarity.LENGTH_TABLE:[F
1: iconst_0
istore 0
start local 0 2: goto 5
3: StackMap locals: int
StackMap stack:
getstatic org.apache.lucene.search.similarities.BM25Similarity.LENGTH_TABLE:[F
iload 0
iload 0
i2b
invokestatic org.apache.lucene.util.SmallFloat.byte4ToInt:(B)I
i2f
fastore
4: iinc 0 1
StackMap locals:
StackMap stack:
5: iload 0
sipush 256
if_icmplt 3
end local 0 6: return
LocalVariableTable:
Start End Slot Name Signature
2 6 0 i I
public void <init>(float, float);
descriptor: (FF)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial org.apache.lucene.search.similarities.Similarity.<init>:()V
1: aload 0
iconst_1
putfield org.apache.lucene.search.similarities.BM25Similarity.discountOverlaps:Z
2: fload 1
invokestatic java.lang.Float.isFinite:(F)Z
ifeq 3
fload 1
fconst_0
fcmpg
ifge 4
3: StackMap locals: org.apache.lucene.search.similarities.BM25Similarity float float
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "illegal k1 value: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
fload 1
invokevirtual java.lang.StringBuilder.append:(F)Ljava/lang/StringBuilder;
ldc ", must be a non-negative finite value"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
fload 2
invokestatic java.lang.Float.isNaN:(F)Z
ifne 5
fload 2
fconst_0
fcmpg
iflt 5
fload 2
fconst_1
fcmpl
ifle 6
5: StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "illegal b value: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
fload 2
invokevirtual java.lang.StringBuilder.append:(F)Ljava/lang/StringBuilder;
ldc ", must be between 0 and 1"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals:
StackMap stack:
aload 0
fload 1
putfield org.apache.lucene.search.similarities.BM25Similarity.k1:F
7: aload 0
fload 2
putfield org.apache.lucene.search.similarities.BM25Similarity.b:F
8: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 9 1 k1 F
0 9 2 b F
MethodParameters:
Name Flags
k1
b
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
ldc 1.2
ldc 0.75
invokespecial org.apache.lucene.search.similarities.BM25Similarity.<init>:(FF)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
protected float idf(long, long);
descriptor: (JJ)F
flags: (0x0004) ACC_PROTECTED
Code:
stack=8, locals=5, args_size=3
start local 0 start local 1 start local 3 0: dconst_1
lload 3
lload 1
lsub
l2d
ldc 0.5
dadd
lload 1
l2d
ldc 0.5
dadd
ddiv
dadd
invokestatic java.lang.Math.log:(D)D
d2f
freturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 1 1 docFreq J
0 1 3 docCount J
MethodParameters:
Name Flags
docFreq
docCount
protected float scorePayload(int, int, int, org.apache.lucene.util.BytesRef);
descriptor: (IIILorg/apache/lucene/util/BytesRef;)F
flags: (0x0004) ACC_PROTECTED
Code:
stack=1, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: fconst_1
freturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 1 1 doc I
0 1 2 start I
0 1 3 end I
0 1 4 payload Lorg/apache/lucene/util/BytesRef;
MethodParameters:
Name Flags
doc
start
end
payload
protected float avgFieldLength(org.apache.lucene.search.CollectionStatistics);
descriptor: (Lorg/apache/lucene/search/CollectionStatistics;)F
flags: (0x0004) ACC_PROTECTED
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual org.apache.lucene.search.CollectionStatistics.sumTotalTermFreq:()J
l2d
aload 1
invokevirtual org.apache.lucene.search.CollectionStatistics.docCount:()J
l2d
ddiv
d2f
freturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 1 1 collectionStats Lorg/apache/lucene/search/CollectionStatistics;
MethodParameters:
Name Flags
collectionStats
public void setDiscountOverlaps(boolean);
descriptor: (Z)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
putfield org.apache.lucene.search.similarities.BM25Similarity.discountOverlaps:Z
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 2 1 v Z
MethodParameters:
Name Flags
v
public boolean getDiscountOverlaps();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.discountOverlaps:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
public final long computeNorm(org.apache.lucene.index.FieldInvertState);
descriptor: (Lorg/apache/lucene/index/FieldInvertState;)J
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual org.apache.lucene.index.FieldInvertState.getIndexOptions:()Lorg/apache/lucene/index/IndexOptions;
getstatic org.apache.lucene.index.IndexOptions.DOCS:Lorg/apache/lucene/index/IndexOptions;
if_acmpne 3
aload 1
invokevirtual org.apache.lucene.index.FieldInvertState.getIndexCreatedVersionMajor:()I
bipush 8
if_icmplt 3
1: aload 1
invokevirtual org.apache.lucene.index.FieldInvertState.getUniqueTermCount:()I
istore 2
start local 2 2: goto 7
end local 2 StackMap locals:
StackMap stack:
3: aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.discountOverlaps:Z
ifeq 6
4: aload 1
invokevirtual org.apache.lucene.index.FieldInvertState.getLength:()I
aload 1
invokevirtual org.apache.lucene.index.FieldInvertState.getNumOverlap:()I
isub
istore 2
start local 2 5: goto 7
end local 2 6: StackMap locals:
StackMap stack:
aload 1
invokevirtual org.apache.lucene.index.FieldInvertState.getLength:()I
istore 2
start local 2 7: StackMap locals: int
StackMap stack:
iload 2
invokestatic org.apache.lucene.util.SmallFloat.intToByte4:(I)B
i2l
lreturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 8 1 state Lorg/apache/lucene/index/FieldInvertState;
2 3 2 numTerms I
5 6 2 numTerms I
7 8 2 numTerms I
MethodParameters:
Name Flags
state
public org.apache.lucene.search.Explanation idfExplain(org.apache.lucene.search.CollectionStatistics, org.apache.lucene.search.TermStatistics);
descriptor: (Lorg/apache/lucene/search/CollectionStatistics;Lorg/apache/lucene/search/TermStatistics;)Lorg/apache/lucene/search/Explanation;
flags: (0x0001) ACC_PUBLIC
Code:
stack=8, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual org.apache.lucene.search.TermStatistics.docFreq:()J
lstore 3
start local 3 1: aload 1
invokevirtual org.apache.lucene.search.CollectionStatistics.docCount:()J
lstore 5
start local 5 2: aload 0
lload 3
lload 5
invokevirtual org.apache.lucene.search.similarities.BM25Similarity.idf:(JJ)F
fstore 7
start local 7 3: fload 7
invokestatic java.lang.Float.valueOf:(F)Ljava/lang/Float;
ldc "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:"
iconst_2
anewarray org.apache.lucene.search.Explanation
dup
iconst_0
4: lload 3
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
ldc "n, number of documents containing term"
iconst_0
anewarray org.apache.lucene.search.Explanation
invokestatic org.apache.lucene.search.Explanation.match:(Ljava/lang/Number;Ljava/lang/String;[Lorg/apache/lucene/search/Explanation;)Lorg/apache/lucene/search/Explanation;
aastore
dup
iconst_1
5: lload 5
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
ldc "N, total number of documents with field"
iconst_0
anewarray org.apache.lucene.search.Explanation
invokestatic org.apache.lucene.search.Explanation.match:(Ljava/lang/Number;Ljava/lang/String;[Lorg/apache/lucene/search/Explanation;)Lorg/apache/lucene/search/Explanation;
aastore
6: invokestatic org.apache.lucene.search.Explanation.match:(Ljava/lang/Number;Ljava/lang/String;[Lorg/apache/lucene/search/Explanation;)Lorg/apache/lucene/search/Explanation;
areturn
end local 7 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 7 1 collectionStats Lorg/apache/lucene/search/CollectionStatistics;
0 7 2 termStats Lorg/apache/lucene/search/TermStatistics;
1 7 3 df J
2 7 5 docCount J
3 7 7 idf F
MethodParameters:
Name Flags
collectionStats
termStats
public org.apache.lucene.search.Explanation idfExplain(org.apache.lucene.search.CollectionStatistics, org.apache.lucene.search.TermStatistics[]);
descriptor: (Lorg/apache/lucene/search/CollectionStatistics;[Lorg/apache/lucene/search/TermStatistics;)Lorg/apache/lucene/search/Explanation;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=11, args_size=3
start local 0 start local 1 start local 2 0: dconst_0
dstore 3
start local 3 1: new java.util.ArrayList
dup
invokespecial java.util.ArrayList.<init>:()V
astore 5
start local 5 2: aload 2
dup
astore 9
arraylength
istore 8
iconst_0
istore 7
goto 8
StackMap locals: org.apache.lucene.search.similarities.BM25Similarity org.apache.lucene.search.CollectionStatistics org.apache.lucene.search.TermStatistics[] double java.util.List top int int org.apache.lucene.search.TermStatistics[]
StackMap stack:
3: aload 9
iload 7
aaload
astore 6
start local 6 4: aload 0
aload 1
aload 6
invokevirtual org.apache.lucene.search.similarities.BM25Similarity.idfExplain:(Lorg/apache/lucene/search/CollectionStatistics;Lorg/apache/lucene/search/TermStatistics;)Lorg/apache/lucene/search/Explanation;
astore 10
start local 10 5: aload 5
aload 10
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
6: dload 3
aload 10
invokevirtual org.apache.lucene.search.Explanation.getValue:()Ljava/lang/Number;
invokevirtual java.lang.Number.floatValue:()F
f2d
dadd
dstore 3
end local 10 end local 6 7: iinc 7 1
StackMap locals:
StackMap stack:
8: iload 7
iload 8
if_icmplt 3
9: dload 3
d2f
invokestatic java.lang.Float.valueOf:(F)Ljava/lang/Float;
ldc "idf, sum of:"
aload 5
invokestatic org.apache.lucene.search.Explanation.match:(Ljava/lang/Number;Ljava/lang/String;Ljava/util/Collection;)Lorg/apache/lucene/search/Explanation;
areturn
end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 10 1 collectionStats Lorg/apache/lucene/search/CollectionStatistics;
0 10 2 termStats [Lorg/apache/lucene/search/TermStatistics;
1 10 3 idf D
2 10 5 details Ljava/util/List<Lorg/apache/lucene/search/Explanation;>;
4 7 6 stat Lorg/apache/lucene/search/TermStatistics;
5 7 10 idfExplain Lorg/apache/lucene/search/Explanation;
MethodParameters:
Name Flags
collectionStats
termStats
public final org.apache.lucene.search.similarities.Similarity$SimScorer scorer(float, org.apache.lucene.search.CollectionStatistics, org.apache.lucene.search.TermStatistics[]);
descriptor: (FLorg/apache/lucene/search/CollectionStatistics;[Lorg/apache/lucene/search/TermStatistics;)Lorg/apache/lucene/search/similarities/Similarity$SimScorer;
flags: (0x0091) ACC_PUBLIC, ACC_FINAL, ACC_VARARGS
Code:
stack=8, locals=8, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 3
arraylength
iconst_1
if_icmpne 1
aload 0
aload 2
aload 3
iconst_0
aaload
invokevirtual org.apache.lucene.search.similarities.BM25Similarity.idfExplain:(Lorg/apache/lucene/search/CollectionStatistics;Lorg/apache/lucene/search/TermStatistics;)Lorg/apache/lucene/search/Explanation;
goto 2
StackMap locals:
StackMap stack:
1: aload 0
aload 2
aload 3
invokevirtual org.apache.lucene.search.similarities.BM25Similarity.idfExplain:(Lorg/apache/lucene/search/CollectionStatistics;[Lorg/apache/lucene/search/TermStatistics;)Lorg/apache/lucene/search/Explanation;
StackMap locals:
StackMap stack: org.apache.lucene.search.Explanation
2: astore 4
start local 4 3: aload 0
aload 2
invokevirtual org.apache.lucene.search.similarities.BM25Similarity.avgFieldLength:(Lorg/apache/lucene/search/CollectionStatistics;)F
fstore 5
start local 5 4: sipush 256
newarray 6
astore 6
start local 6 5: iconst_0
istore 7
start local 7 6: goto 9
7: StackMap locals: org.apache.lucene.search.similarities.BM25Similarity float org.apache.lucene.search.CollectionStatistics org.apache.lucene.search.TermStatistics[] org.apache.lucene.search.Explanation float float[] int
StackMap stack:
aload 6
iload 7
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.k1:F
fconst_1
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.b:F
fsub
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.b:F
getstatic org.apache.lucene.search.similarities.BM25Similarity.LENGTH_TABLE:[F
iload 7
faload
fmul
fload 5
fdiv
fadd
fmul
fastore
8: iinc 7 1
StackMap locals:
StackMap stack:
9: iload 7
aload 6
arraylength
if_icmplt 7
end local 7 10: new org.apache.lucene.search.similarities.BM25Similarity$BM25Scorer
dup
fload 1
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.k1:F
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.b:F
aload 4
fload 5
aload 6
invokespecial org.apache.lucene.search.similarities.BM25Similarity$BM25Scorer.<init>:(FFFLorg/apache/lucene/search/Explanation;F[F)V
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
0 11 1 boost F
0 11 2 collectionStats Lorg/apache/lucene/search/CollectionStatistics;
0 11 3 termStats [Lorg/apache/lucene/search/TermStatistics;
3 11 4 idf Lorg/apache/lucene/search/Explanation;
4 11 5 avgdl F
5 11 6 cache [F
6 10 7 i I
MethodParameters:
Name Flags
boost
collectionStats
termStats
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: new java.lang.StringBuilder
dup
ldc "BM25(k1="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.k1:F
invokevirtual java.lang.StringBuilder.append:(F)Ljava/lang/StringBuilder;
ldc ",b="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.b:F
invokevirtual java.lang.StringBuilder.append:(F)Ljava/lang/StringBuilder;
ldc ")"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
public final float getK1();
descriptor: ()F
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.k1:F
freturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
public final float getB();
descriptor: ()F
flags: (0x0011) ACC_PUBLIC, ACC_FINAL
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.lucene.search.similarities.BM25Similarity.b:F
freturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/search/similarities/BM25Similarity;
}
SourceFile: "BM25Similarity.java"
NestMembers:
org.apache.lucene.search.similarities.BM25Similarity$BM25Scorer
InnerClasses:
private BM25Scorer = org.apache.lucene.search.similarities.BM25Similarity$BM25Scorer of org.apache.lucene.search.similarities.BM25Similarity
public abstract SimScorer = org.apache.lucene.search.similarities.Similarity$SimScorer of org.apache.lucene.search.similarities.Similarity