Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczi committed Jun 21, 2024
1 parent 6d52379 commit 7ca753b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ private static int[] findSegmentStarts(IndexReader reader, RankDoc[] docs) {

@Override
protected void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(NAME);
builder.startArray("docs");
for (RankDoc doc : rankDocs) {
builder.startObject();
doc.toXContent(builder, params);
builder.endObject();
}
builder.endArray();
builder.endObject();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.Strings;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.DisMaxQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ public RetrieverBuilder rewrite(QueryRewriteContext ctx) throws IOException {
public abstract QueryBuilder topDocsQuery();

/**
* Called by {@link CombineRetrieverBuilder} to seal the top docs returned by this retriever.
* This function is called by {@link CombineRetrieverBuilder}s to seal the top docs returned by
* this retriever during rewrite.
*/
public void setRankDocs(RankDoc[] rankDocs) {
this.rankDocs = rankDocs;
Expand Down

0 comments on commit 7ca753b

Please sign in to comment.