Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ private TermVectorsResponse.TermVector randomTermVector(boolean hasFieldStatisti
terms.add(randomTerm(hasTermStatistics, hasScores, hasOffsets, hasPositions, hasPayloads));
}

TermVectorsResponse.TermVector tv = new TermVectorsResponse.TermVector("field" + randomAlphaOfLength(2), fs, terms);
TermVectorsResponse.TermVector tv = new TermVectorsResponse.TermVector("field" + randomAlphaOfLength(7), fs, terms);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'd be nice to check for duplicated before adding to the list and retry. Or to pass in a unique prefix to this method to be sure we don't have duplicates.

return tv;
}

private TermVectorsResponse.TermVector.Term randomTerm(boolean hasTermStatistics, boolean hasScores,
boolean hasOffsets, boolean hasPositions, boolean hasPayloads) {

String termTxt = "term" + randomAlphaOfLength(2);
String termTxt = "term" + randomAlphaOfLength(7);
int termFreq = randomInt(10000);
Integer docFreq = null;
Long totalTermFreq = null;
Expand Down