File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
server/src/main/java/org/elasticsearch/search/rank/feature Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1313import org .elasticsearch .common .io .stream .StreamOutput ;
1414
1515import java .io .IOException ;
16+ import java .util .Objects ;
1617
1718/**
1819 * Defines a custom rank input to rerank results based on snippets rather than full field contents.
@@ -56,6 +57,21 @@ public void writeTo(StreamOutput out) throws IOException {
5657 out .writeVInt (tokenSizeLimit );
5758 }
5859
60+ @ Override
61+ public boolean equals (Object o ) {
62+ if (this == o ) return true ;
63+ if (o == null || getClass () != o .getClass ()) return false ;
64+ SnippetRankInput that = (SnippetRankInput ) o ;
65+ return tokenSizeLimit == that .tokenSizeLimit
66+ && Objects .equals (snippets , that .snippets )
67+ && Objects .equals (inferenceText , that .inferenceText );
68+ }
69+
70+ @ Override
71+ public int hashCode () {
72+ return Objects .hash (snippets , inferenceText , tokenSizeLimit );
73+ }
74+
5975 @ Override
6076 public String name () {
6177 return NAME ;
You can’t perform that action at this time.
0 commit comments