Skip to content

Commit

Permalink
Make HitContext fields final (#90784)
Browse files Browse the repository at this point in the history
HitContext's SourceLookup field can no longer be swapped out, so we can make it
final.
  • Loading branch information
jtibshirani committed Oct 11, 2022
1 parent 1baa24b commit 80a5d86
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class HitContext {
private final SearchHit hit;
private final LeafReaderContext readerContext;
private final int docId;
private SourceLookup sourceLookup;
private final SourceLookup sourceLookup;

public HitContext(SearchHit hit, LeafReaderContext context, int docId) {
this.hit = hit;
Expand Down Expand Up @@ -65,10 +65,6 @@ public SourceLookup sourceLookup() {
return sourceLookup;
}

public void setSourceLookup(SourceLookup sourceLookup) {
this.sourceLookup = sourceLookup;
}

public IndexReader topLevelReader() {
return ReaderUtil.getTopLevelContext(readerContext).reader();
}
Expand Down

0 comments on commit 80a5d86

Please sign in to comment.