Skip to content

Commit d081100

Browse files
authored
Remove extraneous doc id method (#126570)
Removes docId. We can use _getDocId instead of docId instead. They are identical.
1 parent ca19573 commit d081100

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

server/src/main/java/org/elasticsearch/common/lucene/search/function/ScriptScoreFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public LeafScoreFunction getLeafScoreFunction(LeafReaderContext ctx) throws IOEx
6464

6565
if (script.needs_termStats()) {
6666
assert termStatsFactory != null;
67-
leafScript._setTermStats(termStatsFactory.apply(ctx, leafScript::docId));
67+
leafScript._setTermStats(termStatsFactory.apply(ctx, leafScript::_getDocId));
6868
}
6969

7070
return new LeafScoreFunction() {

server/src/main/java/org/elasticsearch/script/ScoreScript.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,6 @@ public void setDocument(int docid) {
116116
this.docId = docid;
117117
}
118118

119-
/** Get the current document. */
120-
public int docId() {
121-
return docId;
122-
}
123-
124119
public void setScorer(Scorable scorer) {
125120
this.scoreSupplier = () -> {
126121
try {

0 commit comments

Comments
 (0)